Ability to define a custom 404 page in the routes declaration
See original GitHub issueWould be pretty neat to be able to set up a route which will be displayed when nothing matches in the routes array. Would be easier than to upload an extra 404.html somewhere (where, by the way). So basically like this:
const routes = [ {
name: "/404",
component: NotFound
}]
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to Create a Great Custom 404 Error Page (with Examples)
Step 1: Design the Page · A clear statement that the page the user requested isn't available · Advice to help your users...
Read more >How to Creating a custom 404 Page with React Routers?
A 404 page is what a user sees when they try to reach a non-existent page on your site (because they've clicked on...
Read more >How to setup 404 page in angular routing ? - GeeksforGeeks
To set up a 404 page in the angular routing, we have to first create a component to display whenever a 404 error...
Read more >Handling 404 Routes in React with a Not Found component
In this post you'll learn how to handle 404 routes in React Router and provide a fallback component for displaying an imfamous 404...
Read more >How to Set a Custom 404 Page With .htaccess
Create or Modify a Custom 404 Page via .htaccess ... Login to your cPanel. Under the Files section click on File Manager. ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @Gh05d
I’ve published a new version 5.6.0 including your suggestion for a custom 404 component. Thank you very much for your help and contribution.
@jorgegorka I actually found out what was the problem with
path
and made a PR: https://github.com/jorgegorka/svelte-router/pull/64