Skip to content
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

Errors originating from hooks can be cryptic depending on the error message #248

Open
itsdouges opened this issue Nov 19, 2024 · 0 comments

Comments

@itsdouges
Copy link
Collaborator

itsdouges commented Nov 19, 2024

React generally doesn't throw errors in hooks, they're thrown in userland (either from a dependency or their own code). We can aid Triplex users by giving them more actionable information of where the error originated from.

Since hooks need to start with use we can use the stack trace and infer if it's from a hook or not. We could stretch this to more use cases if it works well.

The main goal for this issue is to make any errors originating from hooks as obvious as possible with a. guide for how to resolve, e.g. adding global provider context.

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

No branches or pull requests

1 participant