The simplest way to create Global States.
npm install --save usegstateimport { gState } from 'usegstate'
const myGlobalState = gState('hello-world!')import useGState from 'usegstate'
const GenderGetter = () => {
const [gState,setGState] = useGState(myGlobalState)
return (
<div>{gState}</div>
)
}import {GStateProvider} from 'usegstate'
const Wrapper = () => {
return (
<GStateProvider>
<YourWonderfullApp />
</GStateProvider>
)
}MIT © amit231