Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux store template

import { createStore , applyMiddleware , compose } from "redux";
import rootReducer from './reducers/rootReducer.js'
import thunk from 'redux-thunk'
import { Provider } from "react-redux";

const store = createStore(
  rootReducer,
  compose(
    applyMiddleware(thunk),
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
  )
);
ReactDOM.render( 
  <Provider store = {store}>
    <App /> </Provider>,
  document.getElementById("root")
);
 
PREVIOUS NEXT
Tagged: #redux #store #template
ADD COMMENT
Topic
Name
8+6 =