The goal here is to allow people to incrementally convert an existing Redux project to H4R. To start, someone would just replace the Redux createStore with the H4R createStore. In order to do this, H4R's createStore needs to support the same API as Redux (it doesn't currently).
After solely replacing Redux's createStore with H4Rs, the rest of the project should still run and work unchanged. From there, the people doing the migration could incrementally either add createReduxModule calls for new slices or start replacing existing Redux state with createReduxModule.
Support this pattern:
import { setStore, createStore } from "hooks-for-redux";
export default setStore(createStore((state) => state));
The goal here is to allow people to incrementally convert an existing Redux project to H4R. To start, someone would just replace the Redux createStore with the H4R createStore. In order to do this, H4R's createStore needs to support the same API as Redux (it doesn't currently).
After solely replacing Redux's createStore with H4Rs, the rest of the project should still run and work unchanged. From there, the people doing the migration could incrementally either add createReduxModule calls for new slices or start replacing existing Redux state with createReduxModule.
Support this pattern: