feat: add state sync

This commit is contained in:
Richard 2024-02-27 22:20:18 -08:00
parent 5fe86ef030
commit 17a8c48e54
9 changed files with 262 additions and 0 deletions

View file

@ -9,6 +9,7 @@ local subscribe = require(script.subscribe)
local useAtom = require(script.react.useAtom)
local useAtomState = require(script.react.useAtomState)
local useSetAtom = require(script.react.useSetAtom)
local sync = require(script.sync)
export type Atom<State> = atom.Atom<State>
export type ReadonlyAtom<State> = atom.ReadonlyAtom<State>
@ -20,6 +21,7 @@ return {
observe = observe,
split = split,
subscribe = subscribe,
sync = sync,
useAtom = useAtom,
useAtomState = useAtomState,
useSetAtom = useSetAtom,