Closed micahbrich closed 5 years ago
@micahbrich You need to use a globalThis
polyfill for environments that don't have support for globalThis
(i.e. Node versions below 12 and older browser versions)
My favorite globalThis
polyfill is @ungap/global-this
I've updated the README with a Frequently Asked Questions (FAQ) section that includes this information for future users that encounter this error
@andria-dev How would I use your suggested package in my next js project.
Here is my tech stack "next": "^10.1.3", "react": "^17.0.2", "react-dom": "^17.0.2",
Please suggest me some solution ASAP
@skychavda Please check out the Next.js example in the repo. If you can't figure it out from there, please create a new issue detailing the exact problems you are encountering so that those issues can be resolved.
https://github.com/andria-dev/react-spring-modal/tree/main/examples%2Fnextjs
Hey! This looks like a library for exactly what I wanted to build — but I'm a little hung up on
globalThis
. A tiny bit of research says it's a new proposal for replacing the global object (I think?), but do you have any tips on how to get this working out the gate? I can't seem to get pastglobalThis is not defined
errors!