-
Notifications
You must be signed in to change notification settings - Fork 53
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
Batch attributeChangedCallback / Safeguard required props #33
Comments
To me, batching sounds like the proper solution for this issue 👍 |
Because Somewhat related, rerendering for every change could be bad for performance if many changes are made at once, and batching (even just deferring for 0 ms) could alleviate that. But maybe preact already does something about this? |
@raihle Preact batches calls to |
Is there any update one this issue? I'm currently running into the same situation. |
The setup:
From my observations it does not seem like the wrapped preact-application is guaranteed to receive all props, with their corresponding values, in one pass. Even though they are provided to the custom element in "one go". I assume this has to do with how web components and the attributeChangedCallback work https://github.com/preactjs/preact-custom-element/blob/master/src/index.js#L28. Missing values for required props can of course be mitigated by having safeguards in place in the preact-application. But I want to discuss approches to include this functionality in this library instead
Thoughts/Questions:
The text was updated successfully, but these errors were encountered: