Closed ddinggu closed 4 years ago
Similarly to example you have provided, you can place a catch-all route at the end of your routes config,
const views = {
home: new Route({path: '/', component: <Home />}),
// ... all valid routes should be listed here
catchAll: new Route({path: '/:unknown_url', component: <ErrorPage />})
};
also, you can use onEnter to handle additional logic for exceptional cases.
Thanks to Reply!
Hi.
I want to render 404 error page when not matched routers like react-router-dom example.
I can't find any idea in this mobx-router-example or other projects.
Please help this problem. Thank you.