- set a state to the global store
import { neat } from 'neat-state'
const myValueNeat = neat(100)
- get a value from the global store
import { neat } from 'neat-state'
const getMyValueNeat = neat((get) => get(myValue))
- get a value from promise
import { neat } from 'neat-state'
const promiseDataNeat = neat(() => fetch('url-data').then((res) => res.json()))
- use store within components
import { useNeat } from 'neat-state'
const [myValue, setMyValue] = useNeat(myValueNeat)
<>{myValue}</>