Using named exports alow for better tree-shaking and better minification, making all composition functions optional.
True.
But it doesn't have to be OOP - that was just an example.
We can do the same thing with functions:
const Comp = createComponent(component => { const filterRef = ref(component, 'ALL'); const filteredItems = watch( component, [props => props.items, filterRef], ([items, filter]) => filterItems(items, filter) ); return () => <ItemList items={filteredItems.value} />; });
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 🙂
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 🙂