Skip to content

Add flag to let users know when the provider is ready #85

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasong689
Copy link
Contributor

@jasong689 jasong689 commented Aug 30, 2022

To handle NextJs subtleties we use useEffect run code to determine if we're embedded/in an install context via window.location. We also use query parameters to determine if we're the value of isRootFrameRequest. This means there is a very short window of time where it is incorrect while the useEffect hook runs. I think what we should do is provide a flag in our context to let the developer know that we're still initializing the Provider. I've also gone ahead and added code to guard against using the useGadget hook outside of the Provider

closes GGT-2085

…ror if the useGadget hook is used outside the provider
Base automatically changed from update-oauth-url to main September 12, 2022 14:23
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.

1 participant