Inspired by React hooks, seeing how it could work within canvas-sketch.
The hooks.js
includes some limited features (mostly just registering unload()
event and passing props to hooks), and also exports three basic hook examples: MousePosition, GUI, and KeyPress.