Location

All information about the current URL besides splats and params can be found in the location object, which is accessible through the useLocation hook.

function Route() {
	let location = useLocation()
		...
}

Location is an instance of URL, so take a look at this native web platform api if you are not familiar.