Using ReactJS (with Flux) to boost performance for mobile webapps
Submitted by Rakesh Menon (@rakeshmenon13) on Monday, 12 January 2015
- Understand how the Flux architecture is different from MVC (Why did Facebook prefer Flux over MVC?)
- Discuss “Unidirectional data flow”
- Create a short application using React.js and Flux architecture!
- Usage in the mobile environment
ReactJS is not a full featured MVC framework and does not intend to be. It’s only the V in MV*. What differentiates React from other frameworks s it’s render approach. Since DOM manipulations are slow, React replicates the DOM virtually. Your application talks to the Virtual DOM which is really fast, and then React diffs the virtual DOM with the real DOM and applies all changes efficiently.
About Flux Architecture:
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.
It’s based on one simple principle:
“Data moves in one direction through your application”.
We’ll explore how all this translates to the real world scenario! :)
An open mind and otherwise, a laptop (if you want to work with me as I create the application live!)
- Specialist, eXperience Technology - SapientNitro
- JS enthusiast from the dawn of the JS era! :)
- Winner - Yahoo! Open Hack 2012, Bangalore