I've read theoretical overviews of the flux application architecture. I know flux and react go hand in hand, but all the getting started tutorials use browserify right away. What does browserify provide to react? Why is browserify necessary for react/flux to work?
1 Answers
Well, it's not specifically about Browserify, it's about CommonJS.
When implementing modular JavaScript apps, you can use either AMD (RequireJS) or CommonJS (Node).
There's a consensus among React developers to use CommonJS instead of AMD. It's not impossible to use AMD but it's asynchronous aspect makes it harder to work with React components.
So, here is what everyone does: You implement your entire application using CommonJS modules, and then you use a tool to generate a bundle to be used in the client. This tool should compile your JSX and bundle them toghether.
Regarding this tool, Browserify used to be the standard choice. Now the hipsters are kind of prefering Webpack, but Browserify works great. It's a matter of preference.
Again, these tools are not required, but you should take a look at them.

- 56,650
- 48
- 196
- 243