oedotme / generouted

Generated file-based routes for Vite
https://stackblitz.com/github.com/oedotme/generouted/tree/main/explorer
MIT License
1.02k stars 47 forks source link

[Feature] React "Catch" with error information #136

Closed WildEgo closed 9 months ago

WildEgo commented 10 months ago

Hi, amazing library.

I saw that Solid has error information on the "Catch" component, it would be nice to also have it on React for error reporting and the sorts.

oedotme commented 9 months ago

@WildEgo Thanks for your comment!

You can access the error information by using the useRouteError hook within the exported Catch component.

You can also have a custom integration for React Router and expose it the same way as Solid Router.