Closed schardev closed 1 year ago
Apologies. Should have opened separate PRs for each. Lemme know if I should.
@schardev could you put the export changes in a new PR please? 🙏
@schardev could you put the export changes in a new PR please? 🙏
Done.
~Defining an
exports
field inpackage.json
requires to explicitly declare public exports.~Also, if you try to
destory()
the locomotive instance onuseEffect
cleanup it throws an error:It's coming from the core instance's destroy method, which is
undefined
by the time the cleanup runs.Fix it by calling the
destroy()
method in the next repaint. Not sure if this is the best fix but it Just Works™Repro: https://codesandbox.io/s/brave-chatelet-8lv3qd