Redux

  1. What is redux?
  2. What is store?
  3. What is middleware?
  4. What is reducer and hi order reducer?
  5. Good pattern to update state on reducer
  6. What are the async actions?
  7. Normalizing state
  8. How to manage store?

What is store?

The Store is the object that brings them together. The store has the following responsibilities:

What is the concept of “single source of truth” in Redux?

Having a single store enables using the Redux DevTools, makes persisting and rehydrating data simpler, and simplifies the subscription logic.

What is the role of reducers in Redux?

reducer is how the application's state changes in response

Things you should never do inside a reducer:

  • Mutate its arguments;

  • Perform side effects like API calls and routing transitions;

  • Call non-pure functions, e.g. Date.now()or Math.random()

Why is immutability required by Redux?

  • Time-travel debugging requires that reducers be pure functions with no side effects, so that you can correctly jump between different states.

  • Redux uses shallow equality checking in itscombineReducersfunction to return either a new mutated copy of the root state object, or, if no mutations have been made, the current root state object

https://github.com/rt2zz/redux-persist

https://github.com/gajus/redux-immutable

https://github.com/reactjs/reselect

https://github.com/mweststrate/immer

https://github.com/tommikaikkonen/redux-orm

https://github.com/manaflair/redux-batch

https://github.com/tappleby/redux-batched-subscribe

Redux

https://redux.js.org/api-reference

Redux Saga

https://redux-saga.js.org/

Redux persist

https://github.com/rt2zz/redux-persist

normalizr

https://github.com/paularmstrong/normalizr

results matching ""

    No results matching ""