Friday 28 September 2018

javascript - Flux and application state

I'm a bit confused about the Flux architecture, especially about the following statement:




Application state is maintained only in the stores, allowing the
different parts of the application to remain highly decoupled.




I have a component which must have a state. My question is, if I want to use Flux in my application, should this state live in the stores or inside the component? Notice that this state is not data from an API.




Also, if an user performs an action, should the component manage that action or an action creator?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...