Can I "redirect" to a 404 page without changing the url? #9091
-
Basically if I have a dynamic route like: I tried using navigate component like that: Is it possible to achieve want I want? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I'm trying out many new things coming in data router and your question seemed interesting. I'm not sure if you are asking about 6.4 or in general but I guess this approach will work in any case:
See this: https://stackblitz.com/edit/github-vvn3nt?file=src/main.jsx |
Beta Was this translation helpful? Give feedback.
Hi, I'm trying out many new things coming in data router and your question seemed interesting.
I'm not sure if you are asking about 6.4 or in general but I guess this approach will work in any case:
notFound
booleanerrorElement
notFound
totrue
Root
component renders not found content instead of the regular app and the URL stays the sameSee this: https://stackblitz.com/edit/github-vvn3nt?file=src/main.jsx