If I'm understanding correctly, location is provided to "page" components, whereas this is a functional component/hook combo for flexibility in accessing this information.
The main reason for the additional install is this came from a project using Typescript so it needed to be explicitly defined in the package to avoid linting errors/leverage intellisense.
But thanks for bringing that to my attention, I'm sure it would be useful in other scenarios!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If I'm understanding correctly,
location
is provided to "page" components, whereas this is a functional component/hook combo for flexibility in accessing this information.The main reason for the additional install is this came from a project using Typescript so it needed to be explicitly defined in the
package
to avoid linting errors/leverage intellisense.But thanks for bringing that to my attention, I'm sure it would be useful in other scenarios!