rafgraph / react-router-hash-link

Hash link scroll functionality for React Router
https://react-router-hash-link.rafgraph.dev
MIT License
732 stars 62 forks source link

Fix SSR crash #43

Closed AlexCSR closed 4 years ago

AlexCSR commented 5 years ago

I'm building React application with SSR and this package crashes on server build because of window usage.

rafgraph commented 5 years ago

Hi I'm unable to reproduce your issue. The window is only required once the onClick handler is triggered, which shouldn't happen on the server. Do you have a failing example?