You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love to throw notFound() like in the example above.
We have params we know must be valid integers above 0, UUIDs, or enum values for example.
We run assertions to ensure we can narrow the type correctly when it's passed down to beforeLoad, loader, or accessed via Route.useParams().
Right now we throw an error, which means invalid params will display the error component.
Displaying the error page makes it look like there's a bug in our app, when it's not the case.
Displaying the not found page is what we'd expect, and better communicates to the end user what's happening.
Not sure why it's not allowed currently.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd love to
throw notFound()
like in the example above.We have params we know must be valid integers above 0, UUIDs, or enum values for example.
We run assertions to ensure we can narrow the type correctly when it's passed down to
beforeLoad
,loader
, or accessed viaRoute.useParams()
.Right now we throw an error, which means invalid params will display the error component.
Displaying the error page makes it look like there's a bug in our app, when it's not the case.
Displaying the not found page is what we'd expect, and better communicates to the end user what's happening.
Not sure why it's not allowed currently.
Beta Was this translation helpful? Give feedback.
All reactions