solidjs / solid-router

A universal router for Solid inspired by Ember and React Router
MIT License
1.11k stars 138 forks source link

fix memory router no native events #367

Closed yhdgms1 closed 5 months ago

yhdgms1 commented 5 months ago

Without setupNativeEvents function MemoryRouter does not work with component, because it is basically just a link that navigates to some page. As stated in the docs memory router can be used for testing purpose. I guess component should not break then. I know that useNavigate still works, but I think links should work too.

Maybe there wasn't setupNativeEvents on purpose because there is no types in component declaration for arguments of this function, so It's not just was forgotten, so feel free to reject this PR if that's like that.

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 0413594b7bc9e90d98b7016662035bb38d11252f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------- | ----- | | @solidjs/router | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ryansolid commented 5 months ago

It's reasonable. I wasn't thinking. I was thinking how memory didn't have a DOM env but that's not right... it just doesn't necessarily have a browser.