Answer the question
In order to leave comments, you need to log in
Should state be completely migrated to Redux, and if not, when should you use local?
When do you need to use store redux-a, and when do you need to use react's local state? Passing one of the paid courses, I saw how the author partially uses the local state, but for the most part transfers everything to Redux. I didn’t quite understand in what cases it is more profitable to use the state react. I will be glad if you enlighten
Answer the question
In order to leave comments, you need to log in
The strategy is to give preference to the local state. I can say from my own experience that in most cases the global state is not needed. A typical case when a global state is used is authorization.
The data that is needed in several components is transferred to the editor.
In local states, usually only some flags remain that affect the display of the component itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question