import createHistory from ‘history/createHashHistory’;
官方文档没有你的操作步骤的
import React from 'react’
import ReactDOM from 'react-dom’
import { createStore, combineReducers } from 'redux’
import { Provider } from 'react-redux’
import { Router, Route, browserHistory } from 'react-router’
import { syncHistoryWithStore, routerReducer } from ‘react-router-redux’
import reducers from ‘/reducers’
// Add the reducer to your store on the routing
key
const store = createStore(
combineReducers({
…reducers,
routing: routerReducer
})
)
// Create an enhanced history that syncs navigation events with the store
const history = syncHistoryWithStore(browserHistory, store)
ReactDOM.render(
{ /* Tell the Router to use our enhanced history */ }
,
document.getElementById(‘mount’)
)
现在要怎么做啊
我看到他这个库貌似针对react-router并没有针对react-router-dom