I like that concept also, it can solve some issues, but may introduce others.
Using named exports alow for better tree-shaking and better minification, making all composition functions optional.
The way you specify it needs to create a object with all the functions binded.
Thanks for bringing this to discussion. We can find the pros and cons of both approachs and decide where to go!
I like that concept also, it can solve some issues, but may introduce others.
Using named exports alow for better tree-shaking and better minification, making all composition functions optional.
The way you specify it needs to create a object with all the functions binded.
Thanks for bringing this to discussion. We can find the pros and cons of both approachs and decide where to go!
True.
But it doesn't have to be OOP - that was just an example.
We can do the same thing with functions:
My only point is don't hide your dependencies in global state.
I see your ideas.
Would be nice to discuss this better. Could you post your concern on the PR github.com/preactjs/preact/pull/1923
or on Preact Slack
preact.slack.com/
Done 🙂