mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 11:44:08 +00:00
refactor: polish code, logo
This commit is contained in:
parent
18723c1377
commit
e7a1f5d235
7 changed files with 14 additions and 19 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue