-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ch setup redux 165412865 #5
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,14 @@ import ReactDOM from 'react-dom'; | |
import './index.css'; | ||
import App from './components/App'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import { Provider } from 'react-redux'; | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); | ||
ReactDOM.render( | ||
<Provider> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected ')' and instead saw 'Provider'. |
||
<App /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an identifier and instead saw '<'. |
||
</Provider>, | ||
document.getElementById('root') | ||
); | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const reducers = {}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
export default reducers; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'export' is only available in ES6 (use 'esversion: 6'). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { createStore, applyMiddleware } from 'redux'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
import { combineReducers } from 'react-redux'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
import { composeWithDevTools } from 'redux-devtools-extension'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
import thunk from 'redux-thunk'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
import initialState from './initialState'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
import reducers from '../reducers'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'import' is only available in ES6 (use 'esversion: 6'). |
||
|
||
const hostname = window.location.hostname; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
|
||
export default createStore( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'export' is only available in ES6 (use 'esversion: 6'). |
||
combineReducers(reducers), | ||
initialState, | ||
isLocal ? composeWithDevTools(applyMiddleware(thunk)) : applyMiddleware(thunk) | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This comment was marked as outdated.
Sorry, something went wrong.