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

window is not defined in nextjs #37

Open
yashwant-dangi opened this issue Mar 23, 2020 · 2 comments
Open

window is not defined in nextjs #37

yashwant-dangi opened this issue Mar 23, 2020 · 2 comments

Comments

@yashwant-dangi
Copy link

"window is not defined" in nextjs project. Actually window in not available at server side. So, i am using this hack https://github.com/zeit/next.js/issues/2473#issuecomment-362119102 . but this does not work everytime, it will be helpful if you add this check .

@tarborlevan
Copy link

Hmm, No response after 13 months 🤔

@zenflow
Copy link

zenflow commented Apr 22, 2021

@tarborali Good thing there's no need for this package then! Just call Swal.fire in your event handler code. If you were hoping for the popup to be rendered server-side, this package doesn't do that:

render() {
return null;
}

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

No branches or pull requests

3 participants