welldone-software / why-did-you-render

why-did-you-render by Welldone Software monkey patches React to notify you about potentially avoidable re-renders. (Works with React Native as well.)
https://www.npmjs.com/package/@welldone-software/why-did-you-render
MIT License
11.12k stars 199 forks source link

Wydr is causing bug in @react-navigation/bottom-tabs version 5? #213

Closed bleedingAyush closed 2 years ago

bleedingAyush commented 2 years ago

Whenever I am switching bottom tabs my LogBox gives me a warning saying Accessing the 'state' property of the 'route' object is not supported. If you want to get the focused route name, use the 'getFocusedRouteNameFromRoute' helper instead:. But when I uncomment wydr import the error resolves. I have posted on StackOverflow about this question too stackoverflow-question

fernando-orchata commented 2 years ago

Same issue with StackNavigator

BohdanIvanov commented 2 years ago

+1, same problem with bottom tabs

vzaidman commented 2 years ago

Can you please try again with the latest version of react-navigation? I see that they changed the relevant code a little: https://github.com/react-navigation/react-navigation/commit/ebab5183522f5ae03f50f88289c0e7acc208dc02#diff-ac26dec88d71b31af2479666afdc8aaff2b1c846459c603034bf5b7727184516L40