preactjs / preact-router

:earth_americas: URL router for Preact.
http://npm.im/preact-router
MIT License
1.02k stars 155 forks source link

Disable onChange and route() during SSR #331

Open developit opened 5 years ago

developit commented 5 years ago

When rendered via preact-render-to-string, onChange and route() both don't make sense - updates can't be rendered since rendering is synchronous and single-pass, so we'll just disable this functionality entirely.

/cc @kristoferbaxter