2.2.0 • Published 6 years ago
redux-store-init v2.2.0
redux-store-init
redux-store-init is a function used to initialize store.
install
npm install --save redux-store-init
use
import React from 'react';
import { hydrate } from 'react-dom';
import { Provider } from 'react-redux';
import * as reducers from './reducers';
import Store from 'redux-store-init';
import thunk from 'redux-thunk';
import logger from 'redux-diff-logger';
const store = Store({ reducers, devtool: true, applyMiddlewares: [thunk, logger] });
// or
// Store({ reducers, devtool: true }, [thunk, logger]);
hydrate(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('app')
);
options
- devtool: Boolean
- reducers: Object
- compose: Array
- initState: Object
- applyMiddlewares: Array
2.2.0
6 years ago
2.1.0
6 years ago
2.0.0
7 years ago
1.5.1
7 years ago
1.5.0
7 years ago
1.4.1
7 years ago
1.4.0
7 years ago
1.3.2
7 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.2.6
7 years ago
1.2.5
7 years ago
1.2.4
7 years ago
1.2.3
7 years ago
1.2.2
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago