Programmatically get path in `__root.tsx`?
I'd like to get the current URL path within my
My goal is to define my canonical URL in my head's links::
Solutions considered:
- Specify this per route to override the head -- I don't want to do this, for this property, b/c not DRY.
-
-
__root.tsx. Is this possible?My goal is to define my canonical URL in my head's links::
Solutions considered:
- Specify this per route to override the head -- I don't want to do this, for this property, b/c not DRY.
-
window.location.pathname -- won't work b/c of SSR-
ctx - the path is not available on the ctx unfortunately.