How can i detemine the state ?
I have one question that confused me for a long time
I know how Redux work
But when i saw an APP UI,
it is very hard for me to identify the state
because it is very ambiguous.
for example, in the following article,
the auther identify the state of the app is “items” & “selectedItem”
How can he know that ?
i really have no idea …
How can i find out the exact state which can be used with Redux ?
could someone please tell me the process ?
or such process just come from the experiences ?
is there a best practice for identifying the state of the APP ?
please help, thanks
I'm afraid the question isn't very clear. If you're asking about "what things should I put in my state?", it's pretty much any data or variables you might have in your application. You might want to read through http://redux.js.org/docs/recipes/reducers/BasicReducerStructure.html#basic-state-shape and http://redux.js.org/docs/faq/OrganizingState.html#organizing-state-only-redux-state .
Also, this is an issue tracker - usage questions should be asked on Stack Overflow.
@markerikson, thanks reply
I still dont know what will be the state
(or just like u said, what things should I put in my state)
may be the state usually(or often) should be class field (variable) in most of the time