我有這樣路線不COMMITED反應
render(
<Provider store={store}>
<Router history={history}>
<Route path='/' component={TopContainer}>
<IndexRoute component={Login} />
<Route path='main' component={MainContainer} />
<Route path='second' component={SecondContainer} />
</Route>
</Router>
</Provider>,
document.getElementById('root')
)
的路線,我喜歡跳到第二和使用
import { browserHistory } from 'react-router';
browserHistory.push('/#second');
The result was that the browser address field was filled with
"http://localhost:3000/#second" but the page did not move-to/show
"http://localhost:3000/#second" and still stay at the same page.
Now, if I hit enter key on the browser address field it then
show/move-to the right page (http://localhost:3000/#second).
什麼問題嗎?
感謝
爲什麼你有之前''#'秒'? – azium