preactjs / preact-router

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

Router receives empty url when browser's url is updated directly. #399

Closed RajaSK05 closed 2 years ago

RajaSK05 commented 3 years ago

When we update the url directly from the browser, the onChange event in the Router receives an object with url as an empty string and current as null. To maintain hash history, history v5 is used.

developit commented 2 years ago

This should be fixed in Preact Router v4, which supports history v5.