-
Notifications
You must be signed in to change notification settings - Fork 52
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
How to use this with nextjs? #7
Comments
Put grained.js in your public folder and than load script via Nextjs Script Tag:
|
@larovski Thanks, this worked! |
Hint: This might create some issues when rerouting. E.g. Suppose you have two pages, A and B. To prevent this, I encapsulated the #container in a parent which had overflow:hidden applied on it. An example:
Note: I use |
@SaadBazaz thx for coming back and provide an extended solution 👍🏻 |
@larovski you are right but we create build and then showed the error like grained is not defined |
I am not able to use this in nextjs, everytime i import it in a class and try to call it in componentDidMount(), the import throws an error called window not defined
and when i try dynamic importing like this
and call it in componentdidmount like this
i get an error, cannot call a class as a function
The text was updated successfully, but these errors were encountered: