-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Callback data should exclude children #1906
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
There has been no activity in this thread for 90 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 90 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
Unstale, please :cat |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
This issue will be closed due to lack of activity for 12 months. If you’d like this to be reopened, just leave a comment; we do monitor them! |
We currently provide
(e, data)
in all callbacks. This is very useful as the data usually includes props, significant state, and any proposed new values. However,children
should be removed.We should encapsulate the handling of our callback data in a lib function
getCallbackData()
:Before
After
Why?
_owner._currentElement
references.ref
s andkey
s in here, again not something you should be messing with.The motivation for this issue came form using Storybook with the
actions
addon. The callback args are logged. They are parsed with a circular JSON safe parser first. Because thechildren
prop is so massive, this gives a huge performance hit.The text was updated successfully, but these errors were encountered: