Skip to content

atelier-saulx/use-global-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

useGlobalState

works like useState but then with a key that can be used globally.

import useGlobalState from '@based/use-global-state'

const MyComp = () => {
  const [count, setCount] = useGlobalState('counter')
  
  return <div onClick={()=>setCount(Math.random())}> Hello {count}</div
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •