Skip to content

docs(start/framework/routing): add 404 route instructions #13764

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

Merged
merged 4 commits into from
Jun 6, 2025

Conversation

davidbielik
Copy link
Contributor

clarifies 404 route based on #13701 (reply in thread)

Copy link

changeset-bot bot commented Jun 6, 2025

⚠️ No Changeset found

Latest commit: 4ca35e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MichaelDeBoey MichaelDeBoey changed the title Add 404 Route Instruction docs(start/framework/routing): add 404 route instructions Jun 6, 2025
@timdorr
Copy link
Member

timdorr commented Jun 6, 2025

@Hardanish-Singh Please stop with these approvals. They are just noise.

@timdorr
Copy link
Member

timdorr commented Jun 6, 2025

Thanks!

Please submit another PR so we can get something added to the file routing guide as well.

@timdorr timdorr merged commit 5db56e3 into remix-run:main Jun 6, 2025
1 check passed
@davidbielik davidbielik deleted the patch-1 branch June 6, 2025 20:36
@ashbreeze
Copy link

@davidbielik One downside to this method is that the 404 page will then return a 200 status code. This can be alleviated by adding a loader to the 404 page that always fails, eg:

export function loader() {
  return data(null, 404);
}

Not sure if this is a good pattern, but it seems to work reliably.

@davidbielik
Copy link
Contributor Author

davidbielik commented Jun 14, 2025

@davidbielik One downside to this method is that the 404 page will then return a 200 status code. This can be alleviated by adding a loader to the 404 page that always fails, eg:

export function loader() {
  return data(null, 404);
}

Not sure if this is a good pattern, but it seems to work reliably.

Hey, yes I cover that in the follow-up PR: #13771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants