Created
July 24, 2019 07:49
-
-
Save takahirohonda/b6acedaf64a67b73bb5e6fef430cf44a to your computer and use it in GitHub Desktop.
calling-async-function-in-action-with-redux-thunk-4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDom from 'react-dom' | |
import App from './App' | |
import '../public/css/bootstrap.css' | |
import '../public/css/custom.css' | |
import { Provider } from 'react-redux' | |
import { createStore, compose, applyMiddleware } from 'redux' | |
import reducer from './reducers' | |
import thunk from 'redux-thunk' | |
let composeEnhancers | |
composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose | |
let store = createStore( | |
reducer, | |
composeEnhancers(applyMiddleware(thunk)) | |
) | |
ReactDom.render ( | |
<Provider store={store}> | |
<App /> | |
</Provider>, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment