-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
registerCommandListener => pass passedProps #4716
Comments
This is indeed a great suggestion, We've noticed this as well. The issue is actually pretty simple to fix, perhaps someone would like to submit a PR. Basically, passProps are omitted from commands and stored in internally. This is done since props are not guaranteed to be serialisable so they can't be passed over the bridge. Also, props might be pretty large, in which case passing them over the bridge hinders performance. Once a component is mounted we inject props and clear them from store. We should continue omitting props from objects passed over the bridge, while still including them in command events. |
OK let me see if I can add a pull request for this |
@jfrolich any luck with this? |
Nope, wish I had the time, but we need this soon in our app, so I'll will have to look into this soon. |
Just published a pull request for this! |
@jfrolich wicked! How would i use copiedLayoutNode then? |
You don't need to use that, that just makes sure that passed props is not always null in the screen parameter of |
Thanks to @yogevbd, passProps are now (v2.20.0) available in command events 👍 |
@guyca what about v7.1.0? |
Issue Description
It would be nice to have the passedProps available in registerCommandListener. For instance when globally sending screen events for analytics purposes.
The text was updated successfully, but these errors were encountered: