TanStackT
TanStack9mo ago
37 replies
dead-brown

Search params from layout

Hi, reading search parmas from root route (layout) works
    const navigate = useNavigate({ from: "__root__" });
    const search = useSearch({ from: "__root__" });

But when i try to set search params from a component rendered in this root like sidenav then from __root__ is not a valid type it only accepts routes. How to navigate from layouts?
Was this page helpful?