solid-router
solid-router copied to clipboard
Expose createPathMatcher to public
Expose createPathMatcher function. useMatch only works with current path, so you have no options if you want for example compare previous path and see if it matches.
I'm not sure about this, but I think that instead of exposing another function we should add an optional second argument to useMatch, for 2 reasons:
- To reduce the API surface and for easier refactoring
- It seems like
createMatcheris meant to be a lower level API. Right now alluseMatchdoes is getting the current path and callcreateMatcher, but that's a bug I fixed in this PR https://github.com/solidjs/solid-router/pull/213/files