0.3.5 • Published 5 years ago

react-redux-app-container v0.3.5

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

react-redux-app-container

Installation

Install the package:

npm install --save react-redux-app-container

Usage

// index.js

import React from 'react'
import ReactDOM from 'react-dom'
import { ReactReduxAppContainer } from 'react-redux-app-container'
import createStore from './store'
import App from './App'

const store = createStore()

ReactDOM.render(
    <ReactReduxAppContainer store={store}>
        <App />
    </ReactReduxAppContainer>,
    document.getElementById('root')
)
// store.js

import { createStore } from 'react-redux-app-container'

export default () => {
    const initialState = {}
    const reducers = {}
    const middlewares = []
    const enhancers = []

    return createStore(initialState, reducers, middlewares, enhancers)
}

Devtools

The Redux DevTools Extension is automatically recognized.

If you need to pass options to the devtools extension, you can pass them in the 5th parameter:

// store.js
// ...
    const devtoolsOptions = {
        name: 'foo'
    }

    return createStore(initialState, reducers, middlewares, enhancers, devtoolsOptions)
}
0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

6 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago