@breadhead/with-redux-store
v1.1.2
Published
Boilerplate for nextjs redux app
Downloads
3
Keywords
Readme
with-redux-store
Usage
import { withReduxStore, WithReduxProps } from '@breadhead/with-redux-store'
class FabulousApp extends App<WithReduxProps<State>> {
public static async getInitialProps() {
return {}
}
public render() {
const { Component, pageProps, reduxStore } = this.props
return (
<Container>
<StoreContext.Provider value={reduxStore}>
<Component {...pageProps} />
</StoreContext.Provider>
</Container>
)
}
}
export default withReduxStore<State, Api, AppContext>(
FabulousApp as any,
initializeStore,
)