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:
connect
or hooks like useSelector
.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
.