My initial experience with React and Flux


For the past month I’ve been into React and Flux. React is a JavaScript library for building user interfaces from folks of Facebook and Instagram. The reason I like React is because it is simple to learn – you learn a great deal about it just by following official tutorial. Another thing I like about it is their featured JSX compiler allows you to write ES6 code (upcoming version of JavaScript which will be a great deal when it finally comes out).

When learning React, one will definitely came across Flux, the way Facebook structure bigger and more complex applications. This is its definition:

Flux is the application architecture that Facebook uses for building client-side web applications. It complements React’s composable view components by utilizing a unidirectional data flow. It’s more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.

Out in the wild, there exists a lot of implementations of Flux which abstract away a lot of boilerplate. Personally I tried original version of Flux, Reflux and Alt and I think that knowing Flux inner working is essential – it is just like with frameworks. If you don’t know the language, it’s written in, you won’t be able to develop any non-trivial features. I actually started with Reflux since initially I struggled with connecting various pieces together in Flux and Reflux abstracts Flux quite a bit. Than I managed to get handle on Flux. But a weak ago I discovered Alt which I think is the best Flux implementation I came across. I’m loving it.