Once you actively use JSX, I think it becomes a lot less weird. I still wish conditionals in it were first class citizens, but it's never stopped me from getting stuff done.
Comparing React to MVC is always a bit weird. People say it's the V, but components can have any kind of logic in there you want. You can retrieve data when the component loads, bind it to the view, send AJAX events back out when you update data, et cetera.
There's just no strict pattern to it. You're doing all of that in plain old JS, and React is really just responsible for rendering what you do and providing some life cycle hooks.
The Flux pattern solves a lot of problems you end up with when you do this, like sharing information between components, and organizing code in a way that lets you make your components dumber (which makes them easier to reuse).
I highly recommend just playing with vanilla React for a bit. It's super fast to learn, enjoyable to use, and you will quickly figure out why patterns like Flux exist. I had no appreciation for all of the extra files and boilerplate of Redux until I started building something in React, and suddenly it all made sense.
Agreed 100%. JSX is weird for about 5 minutes or so. Another advantage of it is that it demands a proper build system which will also pay dividends down the line.
4
u/9thHokageHimawari Dec 15 '15
I've started wondering.. is it worth using Angular2 for small-scale apps? It feels like I would be better with something else :/