solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

useLocationHash

Open jer3m01 opened this issue 1 year ago • 1 comments

Describe The Problem To Be Solved

reactively use location hash

Suggest A Solution

const locationHash = useLocationHash();

createEffect(() => {
  console.log(locationHash()); // => '#' + string
});

https://developer.mozilla.org/en-US/docs/Web/API/Window/hashchange_event

jer3m01 avatar May 07 '23 15:05 jer3m01