Live data from Hacker News

The React tutorial rewritten in Om

github.com

31–35 of 35 posts

Re: The React tutorial rewritten in Om

#31
post #15

Earlier quoted context omitted.

I can't see the parallels between js/html and css/html. React disregards the js/html because they acknowledge that there never really was proper separation. With css/html, at least to me, it seems like there is a clearer separation. Maybe I'm being shortsighted.

not short sighted at all. i haven't completely convinced myself yet either. :) i guess the question i struggle with then is, what is so nice about that separation? and, could those problems not also be solved in JS?

Exactly.

Re: The React tutorial rewritten in Om

#32
post #25

Earlier quoted context omitted.

I see a recurring pattern in here! We all started seeing mixing markup, style and logic before 2000. Pre 2000 was ruled by functional programming and the decade before was ruled by procedual programming. Then we rapidly started to "encapsulate", when OOP boomed. Now "packaging" is the main problem every programming language and OS has to solve. Today we end up implementing lightweight packages, so called components a…

Fascinating stuff, can you point me to somewhere where I could get more info about all of it?

It's not exactly locatable at one location, but you can read about: http://en.wikipedia.org/wiki/Cliometrics to see this analysis pattern used.

PS: It took me 2hours to remember the word Cliometrics. I usually cannot forget things, but when I do, I remember the beginning of a word. Which is totally frustrating, however I suddenly remembered it.

Re: The React tutorial rewritten in Om

#33
post #4

Earlier quoted context omitted.

Know of any resources of using clojurescript + react without Om (while we wait for more awesome)? Would the idea be calling setState from an atom's watch and transforming the map to a javascript object?

This was posted yesterday: https://github.com/holmsand/cloact

As someone who is having a hard time wrapping my head around the syntax of ClojureScript with its terse variables and so on, I really appreciate that the author took the time to make this so readable.

Re: The React tutorial rewritten in Om

#34

Earlier quoted context omitted.

maybe it's nice, but it's nice in the same way we've been separating HTML and JS for years, which React completely disregards. if styles were solved in a similar way i think you'd be able to get rid of the notion of a selector all together (though it would compile down to normal selector based css). also, components would just be easier to grok and more portable.

Until recently I would disagree that we should find a way to integrate styling into the application code, but I think you make a good point, that styling can be seen as one property of an application component, something that should be coherent with its structure+behavior. As long as the styling code could remain simple to update independently of the business logic, it would be great to have it all part of the same i…

exactly! React helped me realize this point. another practical side effect of style as a property is being able to (sanely and safely) manipulate style based on state.

Re: The React tutorial rewritten in Om

#35
post #9

I know very little about React, so this might be a dumb question. I looked at the source for the example and it looks very nice, but I noticed the DOM is built using constructs like (dom/div ...). Is it also possible to use something akin to hiccup's syntax like [:div ...]?

Looks like Sablono, which provides a Hiccup-style syntax you can use with Om, is your best bet there: https://github.com/r0man/sablono
Post reply on HN