Skip to content

Commit

Permalink
Update store creation
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquesosa committed Feb 25, 2016
1 parent 838e4e5 commit bd4b868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions client/store/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
import { createStore, applyMiddleware, compose } from 'redux'
import rootReducer from '../reducers'
// import { syncHistory } from 'react-router-redux'
import { browserHistory } from 'react-router'

const finalCreateStore = compose(
// Required! Enable Redux DevTools with the monitors you chose
// DevTools.instrument()
)(createStore);

// const createStoreWithMiddleware = applyMiddleware(
// syncHistory(browserHistory)
// )(finalCreateStore)
import { syncHistory } from 'react-router-redux'
import browserHistory from 'react-router'

export default function configure(initialState) {
const store = finalCreateStore(rootReducer, initialState)
const store = createStore(
rootReducer,
initialState
)

if (module.hot) {
module.hot.accept('../reducers', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react-hot-loader": "^1.3.0",
"react-redux": "^4.1.0",
"react-router": "^1.0.3",
"redux": "^3.1.0",
"redux": "^3.3.1",
"redux-actions": "^0.9.1",
"redux-immutable": "^3.0.0",
"redux-simple-router": "^1.0.2"
Expand Down

0 comments on commit bd4b868

Please sign in to comment.