-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The official TodoMVC example is still using imperative state updates? #2407
Comments
It's intentional. In many cases it's easier to use React state for small isolated updates. |
Thank you very much for quickly commenting on that If the local state management were supported, The problem I see here is not so much for this particular example, It feels like a fundamental problem of co-existing of two different architecture patterns, Whereas, if local state was allowed by Redux, it could have been easy the other way around -- Here is an example of how it may look: I can see there is a long discussion with many people expressing their reasons |
This line with imperative state updates makes me puzzled to see it in the Redux architecture
https://github.com/reactjs/redux/blob/master/examples/todomvc/src/components/TodoTextInput.js#L22
This seems to be exactly the style making functions impure and harder to test, that Redux is aimed to discourage or better ban altogether.
Was it an oversight to leave it like that?
The text was updated successfully, but these errors were encountered: