NoriginMedia / react-spatial-navigation

DEPRECATED. HOC-based Spatial Navigation. NEW Hooks version is available here: https://github.com/NoriginMedia/norigin-spatial-navigation
MIT License
226 stars 64 forks source link

SSR Support #30

Closed burakkirkil closed 4 years ago

burakkirkil commented 5 years ago

Problem: I get a 'window is not defined' error when I try to use in SSR application with razzle framework because virtualDebugger is using 'window' object without checking it is exist or not.

Even I got an error without using virtual debugger.

Solution: Adding basic 'window' check for SSR support.

asgvard commented 5 years ago

That's a valid point. Will add this as soon as we have time.

cankahya commented 4 years ago

I got the same issue, trying to implement your (very promising!) library within a Next.js app. So +1 on this one. In the meantime I am trying to figure it out myself! Cheers