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

[bug]: Error "useTheme must be used within a ThemeProvider" doesn't throw at all. #5002

Open
2 tasks done
sankaSanjeeva opened this issue Sep 29, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@sankaSanjeeva
Copy link
Contributor

Describe the bug

If we call useTheme out side of the ThemeProvider, it should throw an error saying "useTheme must be used within a ThemeProvider".

Affected component/components

Root of the application

How to reproduce

  1. Apply darkmode as instruct in the docs
  2. Call useTheme() outside of the ThemeProvider

Expected result: Is should throw an error.

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Windows, Chrome

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@sankaSanjeeva sankaSanjeeva added the bug Something isn't working label Sep 29, 2024
@sankaSanjeeva
Copy link
Contributor Author

I have added a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant