WaspW
Wasp15mo ago
blair

NextJS usePathname equivalent

Gday devs,
I'm currently using client.rootComponent in a similar fashion to NextJS's layout.tsx however was there an alternative to usePathname()? Or do I need to patch together my own?

Obviously window.location.pathname exists but it won't trigger a re-render upon navigation. Couldn't find anything in gh issues or on the docs, so reaching out here. Cheers!
Was this page helpful?