helium/hooks/README.md
ELmars Abolinsh 32befc1a89 random commit
2020-06-21 03:42:26 +03:00

310 B

Hooks are additional functions to utilize the element lifecycle more granularly e.g.

local onDestroyHook = require("helium/hooks/onDestroy")

return function (param)

    onDestroyHook(function()
        doSomething()
    end)

    return function()
        love.graphics.print("Help")
    end
end