Question

What's the 2nd principle of Redux?

#redux #react

Answer

The 2nd principle of Redux is that the *state is read-only*.

The only way to change the state tree is by dispatching an *action*. An action is a plain JavaScript object, describing in the minimal way what changed in the application.

[^1]: http://redux.js.org/docs/introduction/ThreePrinciples.html#state-is-read-only
[^2]: https://egghead.io/lessons/javascript-redux-describing-state-changes-with-actions#/tab-transcript

Learn

Author

xavi

Reviews
Last
next

Students 1