@meniga/redux
v6.1.36-alpha.0
Published
The redux meniga package
Downloads
447
Readme
@meniga/redux
Redux is a library for handling redux.
Exports
Provider, connect, useSelector, useDispatch
Direct exports from react-redux
addMiddleware, removeMiddleware, resetMiddlewares
Direct exports from redux-dynamic-middlewares
createAction, createPredicateAction, createPromiseAction
Helpers to create redux actions
handleAction, handleActions
Helpers to handle redux actions in reducers
createReducer
Helper to create a redux reducer
store
The redux store
Getting started
The Provider should be in your main/bootstrap file and should wrap around your app:
Example:
import { Provider, store } from '@meniga/redux'
function bootstrap () {
const domEl = document.createElement('div')
document.body.appendChild(domEl)
const root = ReactDOM.createRoot(domEl);
root.render(
<Provider store={ store }>
<App />
</Provider>
)
}