Demo on two way binding problem

Why is state management all of a sudden such an important topic?

As the requirements for JavaScript single-page applications have become increasingly complicated, our code must manage more state than ever before. Managing this ever-changing state is hard. If a model can update another model, then a view can update a model, which updates another model, and this, in turn, might cause another view to update.

What is Redux, really?

Redux a predictable state container. It serves only one purpose: manage a state tree. It does one thing only: new_state = root_reducer(old_state, action)`.

What is Redux not?

Redux is not a full web framework or persistance solution. Redux is conceptually different from the traditional Model layer in MVC.

Do I need Redux?

Probably not. Certain scenarios are quite suitable.

What is functional programming? What is Reactive Programming?

What has Redux to do with Flux? React? Rx?


  • How is an action dispatched?
    Each time an action is dispatched, the root reducer will cascadingly call all other reducers with the action and the state slice
  • How to subscribe to single property change in Redux store?
    There is no way to subscribe to part of the store when using subscribe directly, but as the creator of Redux says himself - don’t use subscribe directly!
  • Can I do two way data binding in Redux? How?
    Yes, you can. For a two way binding between property A and B. You need to check if property A is changed in subscribe() change listener, and if it’s changed, you dispatch an action to change property B, vise versa.