mattermost-redux is a library that contains logic for loading and working with data from the Mattermost server. It’s currently used primarily by the Mattermost web app and by some plugins, and it was previously used by the Mattermost mobile app.
Note: As part of our current effort to turn the mattermost-webapp repository into a monorepo, we are also re-evaluating the purpose of mattermost-redux and how we can better expose its functionality for use in third party integrations. The structure of the library and what it exposes for integrations may change over time because of this.
mattermost-redux consists of the following folders:
srccontains all source code that is compiled and shipped with the library.
src/actionscontains the Redux actions used by the library. Most of the logic that uses the stored data and contacts the server is located here.
src/reducerscontains the Redux reducers that handle actions and use them to update the stored data.
src/selectorscontains the selectors used to compute data from the store or just access it more easily.
src/storecontains the setup code for the Redux store that can be extended by applications that use this library.
src/utilscontains utility functions.
testcontains unit testing utilities. Actual unit test is located on the same folder of the file being tested.