I have some configuration settings I want to set and save to redux store before my main app loads. This is so that all the children components already have the configuration data pre-loaded and they can read it from the store using redux-connect.
For now, I only know how to use and update the store inside my connected components that are wrapped in the Provider context.
Is there a way to update it outside of that?
For example:
class App extends React {
constructor(props) {
super(props);
// UPDATE REDUX STORE HERE
}
componentDidUpdate() {
// OR UPDATE REDUX STORE HERE
}
render() {
return (
<Provider store={store}>
<Child />
</Provider>
);
}
}
Is this even possible?
react-redux)! It's just Javascript. You need to read this: redux.js.org/api/api-reference