Cloact: Minimalistic React for ClojureScript
11–20 of 45 posts
Re: Cloact: Minimalistic React for ClojureScript
#12While I haven't had any time to play with ClojureScript, Om, React, etc. I've been keeping a pretty watchful eye, because the stack looks very appealing. One bit that doesn't look appealing to me in Om, or Cloact is the tree-building. Is there anything in ClojureScript and React right now that will let me build templates in HTML and attach functionality via attributes Angular-style?
Re: Cloact: Minimalistic React for ClojureScript
#13Earlier quoted context omitted.
You can use Hiccup style with Om via sablono if you like via http://github.com/r0man/sablono . Om will never dictate nor provide an alternate syntax layer as everyone will want something different. I personally don't care for Hiccup. More importantly, Cloact is much closer to the React model while Om diverges quite a bit because we're interested in enabling patterns that are more difficult otherwise, trivial complete…
Thanks, again :) Yes, exactly, Cloact tries to stay really close to plain React. But since it allows you to separate data from rendering, undo should be quite trivial to implement (if you keep all your application data in a single cloact/atom)...
Re: Cloact: Minimalistic React for ClojureScript
#14How does this all work with non-inlined event handlers? I see a lot of on-click, on-change going on in these examples.
For more information on why react breaks preconceived notions of best practices I recommend checking out http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-be...
Re: Cloact: Minimalistic React for ClojureScript
#15Earlier quoted context omitted.
You can use Hiccup style with Om via sablono if you like via http://github.com/r0man/sablono . Om will never dictate nor provide an alternate syntax layer as everyone will want something different. I personally don't care for Hiccup. More importantly, Cloact is much closer to the React model while Om diverges quite a bit because we're interested in enabling patterns that are more difficult otherwise, trivial complete…
Thanks, again :) Yes, exactly, Cloact tries to stay really close to plain React. But since it allows you to separate data from rendering, undo should be quite trivial to implement (if you keep all your application data in a single cloact/atom)...
Re: Cloact: Minimalistic React for ClojureScript
#16Re: Cloact: Minimalistic React for ClojureScript
#17Earlier quoted context omitted.
Thanks, again :) Yes, exactly, Cloact tries to stay really close to plain React. But since it allows you to separate data from rendering, undo should be quite trivial to implement (if you keep all your application data in a single cloact/atom)...
One thing I can't figure out is why they need to be cloact/atoms and not just regular atoms. Is it because cloact/atoms are observable?
You could still use regular atoms, though, with some extend-type magic. But then you risk messing with non-Cloact code in horrible ways...
Re: Cloact: Minimalistic React for ClojureScript
#18IMHO, This look more easy to read than OM
Agreed. I'm so much more into the hiccup style tree building. This looks like something I can get into tonight. David is great but he prefers his code a little mysterious.
Re: Cloact: Minimalistic React for ClojureScript
#19Cloact: unfortunate name.
Re: Cloact: Minimalistic React for ClojureScript
#20I can't see that word without thinking of Cloaca. Cloaca. If you don't know what it is, you should. Cloaca.