One Logo Pool Ball

System

useActiveParams

This will return the segments of the current URL paths, including dynamic path segments.

Note that this function, as opposed to useParams, will update even when the path is not relevant to the route it is used inside. In general when you need to access params , use useParams, as these will only update when the route is focused.

This hook is useful for things like analytics where you need to access every change globally.

Edit this page on GitHub.