Bindable trait is a little bit confusing for me. Word "bind" rings a bell for me only in the context of Function.prototype.bind but here it's something I'd call watchable/observable etc maybe "bind" here is a term from another ecosystem where it's used more often in such context. I'm not asking to rename it though, but simply clarify documentation a little bit:
You can then bind to those properties with method $bind and observe all changes to the property
Here I'm not sure what "binding" actually does. Maybe it can rephrase something like:
By "binding" (calling instance.$bind("<property-name>", (val, old) => {/*...*/}))) you can subscribe to changes of a specific property of an instance.
Or something along these lines.
Hookable trait has similar problem but with bigger extent (for me at least). I cannot understand what it actually does and what's the usecase here. What does the hook mean in this context? Is it related to any other "hooks" in JS ecosystem? (e.g. async hooks in node.js or react hooks). What is Hookable.CONTINUE and Hookable.FINISH and how to use them.
It would be great to see some examples showing these traits usage
Bindable trait is a little bit confusing for me. Word "bind" rings a bell for me only in the context of
Function.prototype.bindbut here it's something I'd callwatchable/observableetc maybe "bind" here is a term from another ecosystem where it's used more often in such context. I'm not asking to rename it though, but simply clarify documentation a little bit:Here I'm not sure what "binding" actually does. Maybe it can rephrase something like:
Or something along these lines.
Hookable trait has similar problem but with bigger extent (for me at least). I cannot understand what it actually does and what's the usecase here. What does the hook mean in this context? Is it related to any other "hooks" in JS ecosystem? (e.g. async hooks in node.js or react hooks). What is
Hookable.CONTINUEandHookable.FINISHand how to use them.It would be great to see some examples showing these traits usage