<Router history={browserHistory}>
<Route path="/(:filter)" component={Root} />
</Router>
在访问http://localhost/redux/,如果我把path写成/redux, 可以正常匹配,但如果我写成/(:filter)",就报 [react-router] Location "/redux/" did not match any routes,这是什么情况,没道理啊。对了,我用了redux来管理状态,不过这个应该不影响吧。另外如果我要匹配两级地址,应该要怎么写,比如我要匹配/redux/demo1/,path里应该怎么写?
React路由规则