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

Make it possible to disable provider check errors #86

Closed
Quernest opened this issue Nov 22, 2023 · 0 comments · Fixed by #87
Closed

Make it possible to disable provider check errors #86

Quernest opened this issue Nov 22, 2023 · 0 comments · Fixed by #87

Comments

@Quernest
Copy link
Owner

Perhaps the best answer is to:

  1. Have a fallback (destructing is nice)
  2. export the fallback modal (so that my usecase can do an === compare and disable).
  3. Move the exception to the fallback functions.

This would

  1. Allow the existing API.
  2. Fail fast for people who don't do an explicit check
  3. Allow for no provider detection (my usecase)

const modal = useModal();
if (modal === FallbackModal) {
  // disable
} else { 
  const { showModal } = modal;
  // showmaol
}

Originally posted by @michaeltford in #84 (comment)

Quernest added a commit that referenced this issue Dec 3, 2023
@Quernest Quernest linked a pull request Dec 3, 2023 that will close this issue
Quernest added a commit that referenced this issue Dec 3, 2023
* #86 added global configuration object and enforceProvider rule

* #86 bump version
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 a pull request may close this issue.

1 participant