小编Mr *_*. Y的帖子

HashRouter在反应路由器4.x中提示错误

Web Tips图片旁边

https://i.stack.imgur.com/A2OGn.png

Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack
Run Code Online (Sandbox Code Playgroud)

提示错误,这是我再次点击链接的时候


图片旁边是React-Router文件代码......

https://i.stack.imgur.com/WgqqN.png

import { HashRouter, Route } from 'react-router-dom';

import { Provider } from  'react-redux';
import View from './containers';
import configureStore from './store/configureStore';

const store = configureStore();

const AppRouter = () => (
    <Provider store={store}>
        <HashRouter>
            <View.App.Container>
                <Route path='/' exact={true} component={View.App.Dashboard} />
                <Route path='/Todo' component={View.Todo.Container} />
                <Route path='/News' render={() => (
                    <View.News.Container>
                        <Route path='/News/List' render={() => ( …
Run Code Online (Sandbox Code Playgroud)

javascript history reactjs react-router

8
推荐指数
1
解决办法
8797
查看次数

标签 统计

history ×1

javascript ×1

react-router ×1

reactjs ×1