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

Docs suggestion #46

Open
lukio3 opened this issue Feb 2, 2020 · 1 comment
Open

Docs suggestion #46

lukio3 opened this issue Feb 2, 2020 · 1 comment

Comments

@lukio3
Copy link

lukio3 commented Feb 2, 2020

Just a suggestion based upon a gotcha I encountered. When using SSR you get 'document is not defined' (since document is client side only). I modified your example to remedy this.

  const { Portal } = usePortal({
    bindTo: typeof window !== 'undefined' ? document && document.getElementById('selector') : null
  })

Thanks for the package.

@alex-cory
Copy link
Owner

Soon I'm going to do a little overhaul of this project to make it much nicer to work with. I will leave this issue in here and fix it asap

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

2 participants