You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I need to read url parts (pathname, search etc) from clientLoader I do:
export async function clientLoader({ request }: Route.ClientLoaderArgs) {
const location = new URL(request.url);
...
but request.url doesn't have a hash so my location.hash will not be set. How do I work around that?
I can get the hash by using window.location.hash but that works only for initial load because on subsequent navigations window.location still shows old/current location when clientLoader runs
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When I need to read url parts (pathname, search etc) from clientLoader I do:
but request.url doesn't have a hash so my
location.hash
will not be set. How do I work around that?I can get the hash by using
window.location.hash
but that works only for initial load because on subsequent navigations window.location still shows old/current location when clientLoader runsBeta Was this translation helpful? Give feedback.
All reactions