mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
9c4eefcdbf
* Add prettier for examples directory * Fix files * Fix linting * Add prettier script in case it has to be ran again
16 lines
475 B
JavaScript
16 lines
475 B
JavaScript
import { createStore, applyMiddleware } from 'redux'
|
|
import { composeWithDevTools } from 'redux-devtools-extension'
|
|
import thunkMiddleware from 'redux-thunk'
|
|
import withRedux from 'next-redux-wrapper'
|
|
import { rootReducer } from 'fast-redux'
|
|
|
|
export const initStore = (initialState = {}) => {
|
|
return createStore(
|
|
rootReducer,
|
|
initialState,
|
|
composeWithDevTools(applyMiddleware(thunkMiddleware))
|
|
)
|
|
}
|
|
|
|
export const reduxPage = comp => withRedux(initStore)(comp)
|