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

fix: throw when useFiber is used without a FiberProvider #27

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

hansottowirtz
Copy link
Contributor

@hansottowirtz hansottowirtz commented Mar 13, 2023

I spent some time debugging why my app (which uses useContextBridge) wasn't working in production, the reason was I didn't have a FiberProvider. This might be a breaking change so I can of course change it, but would it be possible to add some kind of error or warning when there's no FiberContext? Is there any reason it should not throw?

@hansottowirtz hansottowirtz marked this pull request as draft March 13, 2023 20:47
@CodyJasonBennett
Copy link
Member

CodyJasonBennett commented Mar 14, 2023

I removed this during the Codesandbox outage where package.exports wasn't resolved correctly and this error kept confusing people as React was merely mismatched (4695887, 7c3c345). We can safely add it back under v1, sorry to see that it was needed in the intervening time.

@CodyJasonBennett CodyJasonBennett changed the title feat!(useFiber): throw when no FiberContext found fix: throw when useFiber is used without a FiberProvider Mar 14, 2023
@CodyJasonBennett CodyJasonBennett marked this pull request as ready for review March 14, 2023 11:57
@hansottowirtz
Copy link
Contributor Author

Great, that makes sense. Do you want me to use the same error message as before?

@CodyJasonBennett
Copy link
Member

All good, I aligned it with previous changes w/tests.

@CodyJasonBennett CodyJasonBennett merged commit 21d62ea into pmndrs:main Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants