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
Missing ownerDataMap
in notifier
#281
Comments
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When providing a
getAdditionalOwnerData
function in the options, there is noownerDataMap
provided to thenotifier
.Based on a reading of the source, it also seems to me that passing
ownerDataMap
to thenotifier
is probably not what was meant, but that it should probably be passed theadditionalOwnerData
instead, given thatownerDataMap
is accessible atwhyDidYouRender.wdyrStore.ownerDataMap
anyway.additionalOwnerData
is also not passed tonotifier
.At runtime, the
additionalOwnerData
is actually added to the values inwdyrStore.ownerDataMap
, but nothing is done with them.Additionally, if one tries to get the
additionalOwnerData
oneself inside thenotifier
by retrieving it from thewhyDidYouRender.wdyrStore.ownerDataMap
using either theprevProps
or thenextProps
, this doesn't work, as the props that are used for the keys are the element's props, and not the owner's props. It is the owner's props that are passed to thenotifier
.I was able to work around this by creating my own mapping between owner props and element props, so that I could lookup the element props to use as the key to the
ownerDataMap
:The text was updated successfully, but these errors were encountered: