Back to Mattermost

Redux

docs/develop/contribute/more-info/webapp/redux/index.md

11.10.01004 B
Original Source

The Mattermost web app uses Redux as its state management library. Its key features are a centralized data store for the entire app and a pattern for predictably modifying and displaying that application state. Notably, we're not using Redux Toolkit since a large portion of our Redux code predates its existence.

In addition to Redux itself, we also use:

  • React Redux to connect React components to the Redux store using higher-order components like connect or hooks like useSelector.
  • Redux Thunk to write async actions and logic that interacts more closely with the Redux store.

Currently, the different packages in the web app use Redux in varying amounts. The bulk of our Redux code is in channels where it's split between logic that's more view-oriented, located at the root of its src directory, and logic that's more server-oriented, located in channels/src/packages/mattermost-redux.