mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Make root() return destructor automatically
This commit is contained in:
parent
8142acd1c1
commit
82eec61c45
8 changed files with 26 additions and 30 deletions
|
|
@ -81,9 +81,8 @@ mount(function()
|
|||
|
||||
effect(function()
|
||||
if toggled() then
|
||||
local destroy = root(function(destroy)
|
||||
local destroy = root(function()
|
||||
Counter()
|
||||
return destroy
|
||||
end)
|
||||
cleanup(destroy)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue