File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,12 @@ import React from 'react'
5
5
import ReactDom from 'react-dom'
6
6
import Root from './Root/index'
7
7
import App from './App'
8
- import storeFactory , { history } from '../tools/store/forBrowser'
8
+ import storeFactory , { historyConf } from '../tools/store/forBrowser'
9
9
import reducers from './store/'
10
10
const store = storeFactory ( reducers )
11
+ const history = historyConf ( {
12
+ basename : '/integration'
13
+ } )
11
14
ReactDom . hydrate (
12
15
< Root store = { store } history = { history } component = { App } /> ,
13
16
document . getElementById ( 'bd' )
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ import {routerMiddleware} from 'react-router-redux'
6
6
import { applyMiddleware , combineReducers } from 'redux'
7
7
import { createBrowserHistory } from 'history'
8
8
import configureStore from '../configure/store'
9
- const history = createBrowserHistory ( {
10
- basename : '/integration'
11
- } )
9
+ const historyConf = ( options ) => {
10
+ return createBrowserHistory ( options )
11
+ }
12
12
13
13
const middlewares = middleware . concat ( routerMiddleware ( history ) )
14
14
@@ -19,5 +19,5 @@ const store = reducers => {
19
19
applyMiddleware ( ...middlewares )
20
20
)
21
21
}
22
- export { history }
22
+ export { historyConf }
23
23
export default store
You can’t perform that action at this time.
0 commit comments