clash-and-dashboard/src/stores/RouterStore.ts
2018-09-11 00:54:22 +08:00

15 lines
362 B
TypeScript

import { History } from 'history'
import { RouterStore as BaseRouterStore, syncHistoryWithStore } from 'mobx-react-router'
export class RouterStore extends BaseRouterStore {
constructor (history?: History) {
super()
if (history) {
this.history = syncHistoryWithStore(history, this)
}
}
}
export default RouterStore