preactjs / preact-www

:book: Preact documentation website.
https://preactjs.com
MIT License
358 stars 500 forks source link

fix: links to useContext hook #1099

Closed fengelniederhammer closed 6 months ago

fengelniederhammer commented 6 months ago

interesting observation: When opening the links in a new tab, they work. But simply clicking on them yields a 404 page.

grafik

rschristian commented 6 months ago

This shouldn't fix it, and from testing the preview, it does not. I'd guess it's a routing issue, which lives here

Thanks for bringing this up though!

fengelniederhammer commented 6 months ago

Ok, feel free to replace this by a proper fix then. I didn't know whether you use a framework of some sort to do the routing, but it seems a bit strange to me anyway that you need a / before the fragment.

rschristian commented 6 months ago

We shouldn't need a / before the #, that's the issue. We're using preact-iso for routing, but I think this is just a bad check in user code.

rschristian commented 6 months ago

Closing for #1100