gm0t / react-sticky-el

MIT License
251 stars 47 forks source link

No Ssr support after recent updates #59

Closed deldeldeldeldel closed 4 years ago

deldeldeldeldel commented 4 years ago

"window" is not available during server side rendering. With latest version, before it was ok

yocmen commented 4 years ago

yes, I think is for the new default prop of scrollelement = window, so I think this could be solved with something like:

    scrollElement: typeof window !== "undefined" ? window : null

Lets wait form @gm0t and see what he think.

gm0t commented 4 years ago

Fixed in 2.0.3