Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 UI state rewind on exceptions/errors, trivial undo, and more powerful operations on the applicate state history oriented at interactive debugging and development.

Of course these values might not interest you and you just want a simple direct mapping onto React. Then Cloact looks awesome! :)



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)...


Yep sounds right to me. The other reason I did Om the way I did was to keep the door open for more React optimizations that Om can drive which are more work if you remain close to the React model - particularly only reconciling the specific children that changed in a list instead of iterating over them like React does.


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?


In a way. Using regular atoms you can only get a callback when they are modified, but not when they are deref'ed.

You could still use regular atoms, though, with some extend-type magic. But then you risk messing with non-Cloact code in horrible ways...


Undo is like half of what I want out of a reactive cljs lib! You sly devil you, I guess I'll keep watching both projects.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: