Skip to content

When to use a separate store vs. component parameters and EventCallback #457

Closed Answered by mrpmorris
andylippitt asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need to store state as to whether or not the confirm delete box is visible etc. You can do those in local state (i.e. within the component).

Use Fluxor state when you want to
A: Show data that might be affected from another part of the system. For example, the current user's name in the top bar might change if the user alters their profile.
B: Store state across navigations so you can go back to them - in your example, you might want to store the search phrase, the items in the grid, and the sorting/filtering (in a good grid component this state can be serialized to/from a string).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andylippitt
Comment options

Answer selected by andylippitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants