This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-27
Channels
- # beginners (22)
- # boot (652)
- # boulder-clojurians (1)
- # cider (19)
- # cljs-dev (3)
- # clojure (158)
- # clojure-dev (8)
- # clojure-nl (1)
- # clojure-poland (5)
- # clojure-russia (27)
- # clojure-sg (3)
- # clojure-za (4)
- # clojurescript (44)
- # community-development (2)
- # core-async (17)
- # core-logic (10)
- # css (1)
- # cursive (35)
- # data-science (5)
- # datascript (1)
- # datomic (90)
- # editors-rus (3)
- # events (3)
- # hoplon (90)
- # ldnclj (19)
- # lein-figwheel (2)
- # leiningen (1)
- # om (225)
- # reagent (1)
- # uncomplicate (27)
hey! so I have this app with reloadable code and I wonder if I can create an anonymous cell, which won't be recreated on every run
defonce? or wrap it in a local storage-atom
oh, anonymous, so no defonce
id go the storage atom approache probably, https://github.com/alandipert/hoplon-contacts-demo/blob/master/src/index.cljs.hl#L6
local-storage is returning the cell there
@esp1: nice to hear! what were you using before?
it’s not just hoplon tho, it’s the whole idea u guys have of turning everything into an immutable lisp (boot, etc). so sweet
the point micha made in his talk about hoplon being about values vs react being about events kind of sold me
thanks, its been fun Lisping everything
we didn't even have to invent anything, just put the pieces together and convince our bosses
well you may be standing on the shoulders of giants but i’m standing on yours now too. really great stuff, thank you!
"if i haven't seen as far as other men, it's because i have giants standing on my shoulders"
@esp1 i'd be curious to hear what other thoughts you might have on react vs hoplon
i haven't used react at all except for hello world toy things
well, i’m still pretty new to hoplon so i don’t know that i can make much of an informed comparison for the exact opposite reason
but even so far it’s highlighting to me that a lot of things like all of react’s lifecycle methods, or all the craziness going on in that area re state management are solved much more elegantly when dealing with values vs events
The biggest difference for me is that react has a render loop with lifecycles. In some ways it’s closer to app development. It’s got its strengths and weaknesses. For one thing, I miss being able to just (if) things out instead of using css to hide components.
react was a revelation to me in terms of how much nicer it made ui programming, but hoplon has been even more of a revelation, which is kind of insane
@levitanong: we will have suport for the if
style soon
Hurrah!
The other thing is, loop-tpl has to bind to a “real” element, so I can’t pass loop-tpl as a “child” of a custom component
@levitanong: another thing that will be fixed soon
But the rest of Hoplon is just too nice to give up. Haha! I’m willing to live with the warts
though i’m really relieved to hear the warts will be excised soon
all the differences between custom element and real element will be removed soon, hopefully
so exciting!
can’t wait
:thumbsup:
Would you guys perchance also plan to have some kind of transition hooks for the if
forms
Like, some kind of transition when the component is “entering” and “leaving"
There must be some more idiomatic way of doing it, but I’m coming from react, so that’s the only way I can express it
well, they can be optional, no? 😄 to support the guys who do both design/UX and program
@levitanong what’s your use case?
So right now I’m using hoplon to create really quick iOS design prototypes (i hate working with adobe illustrator and photoshop, and prefer to work with code)
as I navigate the prototype, I want to also be able to convey the components transitioning in and out, as they would in the final app (useful for communicating with the native dev)
Right now, because if
isn’t supported, it isn’t much of an issue, as i have to use CSS to hide things anyway, so it’s trivial to just transition between hidden and shown states
once if
comes in, it will be a challenge figuring out how to animate from simply not being there, to being there and offscreen, then finally to being in its resting visible state.
i’m guessing that the if style in hoplon will be supported by allowing formula cells to be composed alongside normal elements
You mean (cell= (if condition custom-component))
?
@micha: You have a point. 😛 But using css to hide things just seems so… wrong.
^ I have never encountered that idiom, but I love it
:O That is beautiful
Welp, I’m off to bed. Have a great day, guys!
@micha: re: angular using the comment node as sentinel, do you think that's what we should use as the loop-tpl sentinel node type?
@alandipert: i'm not sure it will work