TanStackT
TanStack2y ago
1 reply
moderate-tomato

how to get URL or current route

can i somehow get the url or current route in the main component using tanstack/router maybe there is some hook

function App() {
const href = useHook()

if(href === 'someroute') {
return (<Component />)
}

return (
<div>
<Outlet/>
</div>
)
}
Was this page helpful?