0.1.1 • Published 4 years ago

next-redux v0.1.1

Weekly downloads
73
License
MIT
Repository
github
Last release
4 years ago

next-redux

Next.js Redux coupling

npm no dependencies


Installation

npm add redux react-redux next-redux

Synopsis

appWithRedux(reducer, [enhancer])

Usage

In the pages/_app.js file of your Next.js project:

import { combineReducers, applyMiddleware } from 'redux'
import { appWithRedux } from 'next-redux'

const reducer = combineReducers(/* Your reducers here */)

export default appWithRedux(reducer)

With redux-devtools and redux-thunk

import { combineReducers, applyMiddleware } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunkMiddleware from 'redux-thunk'
import { appWithRedux } from 'next-redux'

const reducer = combineReducers(/* Your reducers here */)
const enhancer = composeWithDevTools(applyMiddleware(thunkMiddleware))

export default appWithRedux(reducer, enhancer)

License

MIT

0.1.1

4 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago