###Architecting ReactJS Apps with flux
TIL the lifecycle of Flux, Flux is just a pattern that can be applied to other framework such as Angular. Some of the terms mentioned in the tutorial that I've been reading throws a lot of new jargons that I need to google it first before proceeding on the proceeding steps.
-
Views/Components - These are just only a react components that get its initial state from the store. The store (based on what I've learned) acts like a centralize data center for all the components that will be needing that state instead of passing the state throughout the child to parent (vice versa)
-
Actions - A component function invokes an action method such as AddItem() RemoveItem() and etc.
-
Dispatcher - The dispatcher emits an event together with the payload from the actions that needs to go all the store. (I'm slightly confused on this part since the only thing that the dispatcher will do is to emit an event. pwede namang pagisahin nalang yung action at dispatcher
-
Store - where the magic happens. The store listens for all the events that the dispatcher will emit. Once the store capture an event it modifies the internal state and broadcast a "change" event which the component will update itself with the latest state.
I'll be creating a sample application that will apply the flux pattern. Hope to finish it soon.
ref link http://tylermcginnis.com/reactjs-tutorial-pt-3-architecting-react-js-apps-with-flux/