onBeforeElUpdated for events clobber's user's provided version
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
This was already addressed here originally in PR #44 . but then taken out to simplify that PR. To paraphrase:
We use our own custom onBeforeElUpdated function for memoizing sub-components, but then lose the ability to copy events. We'd need to be able to use both, ideally running the user function before the copier (since the user returning false immediately would make the event copier operations redundant).
I've seen the memoization example from the "choo stateful playground" example (though we aren't using choo directly), but it would be better at least for our purposes to have the isSameNode check internalized once in our main node comparison, rather than needing to include customElement.isSameNode = () => true; comparisons externally at the root of every one of our memoized sub-components (though only after the first update, which again adds more closure boilerplate if the same component is being used multiple times).
If there would be a way to get in @kristoferjoseph s work via this issue that would be great :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the implementation of onBeforeElUpdated and the changes discussed in PR #44. Trace how the custom memoization callback interacts with event copying and isSameNode; done means user callbacks and event copying can coexist with the intended callback ordering and memoization behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100