plantilla de redux crear aplicación react
npx create-react-app my-app --template redux
Gorgeous Goshawk
npx create-react-app my-app --template redux
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")
);