Closed ryanflorence closed 2 years ago
parsePath
is just a parser that tells you what's in the string. It's not designed to give you a full location
object. Internally it's used in several places to determine if a string contains e.g. a search
or hash
component.
If the URL is "/some/where"
I think it'd be more useful if the returned
path
fromparsePath
looked more like a location.Then you can do things like diff the search params of the current URL and some potential next URL.
This would clean up some code over in Remix for
<link rel="prefetch">
as well as creating something like<PendingLink />
. Today it complicates the comparison withsearch
.