How is Redux different from Backbone or Flux? Learn the first principle of Redux—the single immutable state tree.
We are presenting a “complete” example in the code window below. Feel free to click around and explore! We will be explaining what everything does during this course.
This is a typical
When I added the first todo, it was added to the todos array, inside our state object. The todo itself, is described by a plain child script object, saying it was not completed, and the text was saved. Every further change that the app, whether when I was crossing out the todos, or when I changed the
visibility filter, resulted in this change to this state object, described in our whole application.
Now you know the first principle of Redux, which is that, everything that changes in your application, including the data and the UI state, is contained in a single object, we call the state or the state tree.