The meaning of my question is that it is necessary to store all the data in the store of the editor? Can the main information for example a list of books, music, etc. stored in the store, and logic such as the display of this data and the cover in setState, for example, when you click on the button to change a boolean value according to setState ({show: true}) or setState ({show: false}) ?
- I would look at recompose: withState, and also redux-fractal and redux-ui - Daniel Khoroshko
|
1 answer
It is not possible, but necessary. Everything related to the visual component of the component, and data that does not go beyond its scope (for example, value for input), is stored in the state. And the global data, which is used in several components, in the store of redox. And it is better to start boolean variables with the word is ..., but this is not critical.
- "(for example, value for input" - but the redux-form will not agree with you - Daniel Khoroshko
- It would be strange if redux-form worked without redux, don't you think so? And, for example, react-select agrees with me completely. ) - DiDex
- The redux-form stores all form values in the stack, which is inconsistent with your statement, so I gave an example - Daniel Khoroshko
- "(for example, value for input), stored in state" and "stores all form values in the stack", I do not see the disagreement, and you? - DiDex
|