Why Use React?
To a beginner, the advantages of React are not immediately obvious. Here are a few reasons to use React.
You can always tell how your component will look render by looking at one source file.
If you know the state, you know the rendered output. You don’t have to trace program flow. When working on complex applications, especially in teams, this is critically important.
UI code is readable and maintainable. Componentized UI is the future of web development, and you need to start doing it now.
Sidenote - What is Flux?
The concept “Flux” is simply that
- your view triggers an event (say, after user types a name in a text field)
- that event updates a model
- then the model triggers an event
- the view responds to that model’s event by re-rendering with the latest data. That’s it. This one way data flow / decoupled observer pattern is designed to guarantee that your source of truth always stays in your stores / models. It’s a Good Thing™.