|
|
|
|
|
by jypepin
2621 days ago
|
|
Some people would argue that if using Redux, also having local state logic is an anti pattern. That would mean that if you use Redux, a form also requires actions for form update/submit/success/error and the form data should be stored in the redux store. That is one of the main issues I have with Redux, which I feel adds automatic complexity for simple things, but at the same time I'm not sure if it's very good to have a mix of tings happening from store/actions/reducers and others from local state/ajax. |
|
I won't disagree that this is a popular opinion, but there's little practical benefit to storing state that's truly local to a single component (or a very small tree) in Redux just because it's there.
Even the maintainers of Redux maintain that it's perfectly acceptable to use local state - https://redux.js.org/faq/organizing-state#do-i-have-to-put-a...