-
Notifications
You must be signed in to change notification settings - Fork 21
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
请问一下404路由怎么配置,不设置path的404component,每个页面滑动到底部都会出现404的页面 #17
Comments
可以提供一下路由那块的代码吗,或者可以先参考下: function App() {
return (
<div className="App">
<Switch>
<Route exact path="/" component={Home} />
<Route path="/item/:id" component={Detail} />
<Route path="/about" component={About} />
<Route path="/items" /> // 占位
<Route path="*" render={NotFound} />
</Switch>
<LiveRoute
path="/items"
component={List}
livePath="/item/:id"
name="items"
onHide={routeState => {
console.log("[on hide]");
console.log(routeState);
}}
onReappear={routeState => {
console.log("[on reappear]");
console.log(routeState);
}}
/>
<Bar />
</div>
);
} 如何配合 Switch 使用 |
|
试了你的方法,貌似没起效 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问一下404路由怎么配置,不设置path的404component,每个页面滑动到底部都会出现404的页面
The text was updated successfully, but these errors were encountered: