'React redux create store methods
I am new to redux and I want to know what are all methods can we use to create a redux store in a react application. Can anyone help me?
Solution 1:[1]
The Redux store API is tiny and has only four methods:
store.getState() - Returns the current state object tree.
store.dispatch(action) - Dispatch an action to change the state.
store.subscribe(listener) - Listen to changes in the state tree.
store.replaceReducer(nextReducer) - Replaces the current reducer with another.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alessandro |
