Should pathname from useLocation be fully typed ? #1981
Closed
VdeVentura
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I'd assume the reasoning behind this was that technically speaking, the returned value from useLocation is not actually the same as ToPathOptions. The pathname from useLocation is the builtLocation with search, params, hash, etc already added to the string, so it's not actually the path Id which is why it could be any string. I agree it might be nice to provide the path ID from the useLocation hook as this has come up several times for me, but you can also access this by using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now location is returning just a string, is there any reason not to have pathname being typed something similar to
ToPathOption
?Beta Was this translation helpful? Give feedback.
All reactions