javascript - Should I pass all the state in every change from store to component? -


i new on react , flux , making app have input (like name or title), , below list of n things.

how should handle event listeners? saw in todo example of flux (https://github.com/facebook/flux/blob/master/examples/flux-todomvc/) use 1 change listener , emit event store state on every change.

is ok real app? if not, do?

yes, okay real app. typical emit whole objects stores if happens 1 of listeners needs subset of data. idea keep simple , avoid having change store when listener needs changes.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -