elements
elements copied to clipboard
Show `NotFound` component if no React Router route is matched — dev portal
User story.
As a end-user, if I hit a malformed URL, I'm taken to the root of the docs site instead of shown a blank screen.
Is your feature request related to a problem?
Yeah I considered filing a bug. We're deploying the Dev Portal as a SPA on a sub-route /docs
. If we hit any of routes configured with React Router, we're fine e.g. /docs/foo
.
However, if you hit /docs/foo/bar
, no React Router route is matched, and nothing renders to the page.
Describe the solution you'd like
I would expect at least your NotFound
component to render. Alternatively, it'd be great to be able to supply a fallback, like say taking them to our "Overview" page.
Additional context
@pamgoodrich
Hello!
Our team recently took over the stewardship of the elements repo.
Due the volume of un-triaged issues that are pretty old and the time it would take us to get caught up on all of them, we kindly ask that you open up a new ticket if this is still an issue you're struggling with.
If you open a new issue please include:
- clear steps to reproduce that include example OAS specs, application setup, code, etc.
- the error or issue you are experiencing
- the expected behavior
We will be triaging any new tickets in a timely manner.
Thank you for understanding!