Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-router-config在未登录的情况下路由保护 #16

Open
pei-han opened this issue Jul 6, 2018 · 0 comments
Open

react-router-config在未登录的情况下路由保护 #16

pei-han opened this issue Jul 6, 2018 · 0 comments

Comments

@pei-han
Copy link
Contributor

pei-han commented Jul 6, 2018

@didilinkin
privateRoutes.js中,exact为true,应该只能对访问路径为/拦截,验证是否登录,如下:
const privateRoutes = [{
path: '/',
exact: true,
component: PrivateRoute // 无其他信息; 不需要渲染组件
}]
那么,访问其他的路径,是不会验证登录的,是不是有问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant