Skip to content

Commit

Permalink
Completely rewrite URL handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstange committed Dec 5, 2016
1 parent b15df5a commit 977ae15
Show file tree
Hide file tree
Showing 15 changed files with 426 additions and 431 deletions.
8 changes: 1 addition & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { render } from 'react-dom';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import { browserHistory } from 'react-router';
import { syncHistoryWithStore, routerReducer, routerMiddleware } from 'react-router-redux';
import reducers from './src/content/reducers';
import Root from './src/content/containers/Root';
import threadDispatcher from './src/common/thread-middleware';
Expand All @@ -30,11 +28,9 @@ const worker = new CleopatraWorker();

const store = createStore(
combineReducers(Object.assign({}, reducers, {
routing: routerReducer,
worker,
})),
applyMiddleware(...[
routerMiddleware(browserHistory),
thunk,
threadDispatcher(worker, 'toWorker'),
process.env.NODE_ENV === 'development'
Expand All @@ -44,10 +40,8 @@ const store = createStore(

handleMessages(worker, store, messages);

const history = syncHistoryWithStore(browserHistory, store);

render(
<Root store={store} history={history} />,
<Root store={store} />,
document.getElementById('root')
);

Expand Down

0 comments on commit 977ae15

Please sign in to comment.