useLocation
Get the current location and navigate programmatically.
Description
Returns a tuple [location, navigate] where:
locationis a reactiveRef<string>containing the current pathnamenavigateis a function to programmatically change the location
Returns
Example
Navigate Options
The navigate function accepts an optional second parameter:
replace: boolean- Iftrue, replaces current history entry instead of adding a new one (default:false)