-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onBeforeElUpdated for events clobber's user's provided version #54
Comments
@brokenalarms does passing an options object with events set to false also fix this issue?
You would need to do some sort of conditional check and prepare an options object to pass when calling update. |
Reason I ask is because the initial thinking behind currying was two fold:
|
@kristoferjoseph I replied via email but I don't think it worked, so sorry if this comes through twice.
But that's kind of the point of |
I didn't really consider not loading events (since that's the point of Yes, the events copying should run as well as the user function - in the Are you talking about a use case where the user users their own function to On Thu, Oct 20, 2016, 9:01 AM kj [email protected] wrote:
|
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 thecopier
(since the user returningfalse
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 includecustomElement.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 :)
The text was updated successfully, but these errors were encountered: