Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takahirohonda/b6acedaf64a67b73bb5e6fef430cf44a to your computer and use it in GitHub Desktop.
Save takahirohonda/b6acedaf64a67b73bb5e6fef430cf44a to your computer and use it in GitHub Desktop.
calling-async-function-in-action-with-redux-thunk-4
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