Skip to content

tokisakiyuu/bind-url-hash

Repository files navigation



🔗 bind-url-hash

use url hash store state and provide react hook

http://example.com/#message=hello
                   --------------

mapping to object

{
  message: 'hello'
}

bind to Component state

function MyComp() {
  const [state] = useURLHash()
  return (
    <div>message: {state.message}</div>
  )
}

DEMO

CodeSandbox

About

use url hash store state and provide responsive react hook

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors