refactor: polish code, logo

This commit is contained in:
Richard 2024-02-25 12:05:59 -08:00
parent 18723c1377
commit e7a1f5d235
7 changed files with 14 additions and 19 deletions

View file

@ -6,7 +6,7 @@ type Atom<T> = atom.Atom<T>
type UseAtomState =
(<State>(atom: Atom<State>) -> State)
& (<State, Result>(atom: Atom<State>, ((State) -> Result)?) -> State | Result)
& <State, Result>(atom: Atom<State>, selector: (State) -> Result) -> Result
& (<State, Result>(atom: Atom<State>, selector: (State) -> Result) -> Result)
local function useAtomState<State>(atom: Atom<State>, selector: ((State) -> State)?): State
local state, setState = React.useState(function()