Skip to content

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

Draft
jasong689 wants to merge 1 commit into
mainfrom
better-provider
Draft

Add flag to let users know when the provider is ready#85
jasong689 wants to merge 1 commit into
mainfrom
better-provider

Conversation

@jasong689

@jasong689 jasong689 commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

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