Skip to content
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

Add delegate parameter to allow for harvesting additional data from react element #203

Merged
merged 4 commits into from
Jun 13, 2021
Merged

Add delegate parameter to allow for harvesting additional data from react element #203

merged 4 commits into from
Jun 13, 2021

Conversation

ereddrex
Copy link
Contributor

@ereddrex ereddrex commented Jun 7, 2021

In an effort to expose the _nativeTag on the element, I need access to the raw react element, most easily accessed in the 'storeOwnerData' function. Created an optional delegate parameter to access the raw element and return additional data in a returned object, which is stored in the ownerDataMap to be referenced later.

With this change, in combination with my 'notifier' override adding this data to the 'displayName', I am able to identify my native elements via their closest relative native Id (which can be used to correlate wdyr to my ReactNative UI elements).

image

@ereddrex
Copy link
Contributor Author

ereddrex commented Jun 7, 2021

@vzaidman, I would appreciate review of this proposed change when you have a moment. Please let me know if you have any questions or concerns.

  • E

@vzaidman
Copy link
Collaborator

vzaidman commented Jun 9, 2021

Hey!
Thank you for your contribution.
I'll try to look at it asap.

I think this will be a little more appropriate and clear what's WDYR native, and what was added to `ownerDataMap` by the user.
@vzaidman vzaidman merged commit dff9bc3 into welldone-software:master Jun 13, 2021
@vzaidman
Copy link
Collaborator

Thank you very much for your contribution!

Sorry it took me so long to approve.

Notice the little change I did in the code.

@vzaidman
Copy link
Collaborator

published in v6.2.0

@ereddrex ereddrex deleted the ereddrex/additionalOwnerData branch June 14, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants