mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 11:44:08 +00:00
fix: wrap hooks in untracked, update types
This commit is contained in:
parent
1657e2cb74
commit
87e7260c16
5 changed files with 40 additions and 16 deletions
|
|
@ -10,7 +10,7 @@ local function useAtom<State>(getter: () -> State): () -> State
|
|||
local state = Vide.source(getter())
|
||||
|
||||
Vide.cleanup(Charm.effect(function()
|
||||
state(getter())
|
||||
Charm.untracked(state :: (State) -> State, getter())
|
||||
end))
|
||||
|
||||
return state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue