路由配置如下:
import React from 'react';
import ReactDom from 'react-dom';
import Index from './index';
import {Router,Route,hashHistory} from 'react-router';
import ComponentList from './components/list';
export default class Root extends React.Component{
render(){
return (
);
}
}
ReactDom.render(
用webpack-dev-server启动项目,
输入http://localhost:8080/#和http://localhost:8080/都显示index,
输入http://localhost:8080/list提示Cannot GET /list,
http://localhost:8080/#/list也显示index 就是不会显示list 求解??????
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
history改browserHistory
然后看看你的ComponentList 这个写的是否正确