easy way to migrate from Redux to Storeon
npm i -S storeonize
just add storeonize
to your imports
// before
import { createStore, applyMiddleware } from 'redux'
// after
import { createStore, applyMiddleware } from 'storeonize/redux'
-
redux
- [x] createStore
- [x] applyMiddleware
- [x] combineReducers
-
redux-logger
- [x] createLogger
-
redux-devtools-extension
- [x] composeWithDevTools
-
react-redux
- [x] Provider
- [x] connect
combineReducers
is not the same as redux's
the only arguments is a map:
combineReducers({
someReducerName: [reducerFunction, [array of connected actions]
})
First of all, you can use your own modules passing them to applyMiddlware
.
I suggest you to start rewriting code in this way: reducers, then middlewares.
- [ ] typings
- [ ] other redux-stuff