-
Notifications
You must be signed in to change notification settings - Fork 269
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
enquire is undefined #170
Comments
I am also having this issue, "enquire is not defined". My code is similar to the example codes:
note: I am trying to use enquire in React |
The same thing here. I've tried to import as follows:
|
Did anybody find any solution to this issue? |
Not ideal but you can use provide plugin:
|
For reasons I can't quite recall, the import enquire from "enquire.js/dist/enquire"; Here's a working example: https://codesandbox.io/s/naughty-bash-9q0og. To test you'll need to open this and resize your window: https://9q0og.csb.app/ |
Actually, I take that back, I can import enquire.js directly, as seen here: https://codesandbox.io/s/adoring-cloud-rfncs import enquire from "enquire.js"; |
I'm having some trouble with this. I've included it using import via gulp / webpack. the enquire.js code gets included in my main.bundle.js file above the code that references it.
Then, when I try to use it,
enquire.default.register("screen and (max-width:560px)", {
I get error
enquire is undefined
What have I done wrong?
The text was updated successfully, but these errors were encountered: