Open lelandcope opened 5 years ago
Why does a route fallback to a previous pathname if no match is found? Shouldn't it fallback to the catch all route instead? Is there a way to force it to use the catch all route in these instances?
{ path: '/docs', load: () => Promise.resolve(require('../components/Docs').default), children: [ { path: '/:id', load: () => Promise.resolve(require('../components/ViewDoc').default), chunk: false } ] }, { path: '*', load: () => new Promise((resolve, reject) => { try { require.ensure(['../components/404Page'], (require) => { resolve(require('../components/404Page').default); }); } catch (err) { reject(err); } }) }
If I go to /docs/22/ANYTHING_ELSE_HERE I would expect it to hit the catch all route defined above but instead it renders ViewDoc.
/docs/22/ANYTHING_ELSE_HERE
ViewDoc
Is there a way to force it to the catch all error route?
Why does a route fallback to a previous pathname if no match is found? Shouldn't it fallback to the catch all route instead? Is there a way to force it to use the catch all route in these instances?
Example
Routes
URL
If I go to
/docs/22/ANYTHING_ELSE_HERE
I would expect it to hit the catch all route defined above but instead it rendersViewDoc
.Is there a way to force it to the catch all error route?