Make root() return destructor automatically

This commit is contained in:
aaron 2024-10-06 15:37:05 +01:00
parent 8142acd1c1
commit 82eec61c45
8 changed files with 26 additions and 30 deletions

View file

@ -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