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.32k stars 199 forks source link

wyd support to react 19 #298

Open eduardocque opened 6 months ago

eduardocque commented 6 months ago

Hi,

After move to react 19 ( https://react.dev/blog/2024/04/25/react-19-upgrade-guide / https://react.dev/blog/2024/04/25/react-19-upgrade-guide#libraries-depending-on-react-internals-may-block-upgrades), seems to be that is failing due the use of a internal method

image

is there a workaround meanwhile this is fixed ?

Regards

eduardocque commented 6 months ago

@vzaidman hi mate, can be possible support react 19 ?

vzaidman commented 6 months ago

Yes I looked into it. It's not trivial to support but I'll be working on it in the upcoming weeks. Thanks for noticing

eduardocque commented 6 months ago

no worries, hopefully will be soon, for the moment had to disable this library due that fatal error, but i will keep an eye about future updates

thx for the help

jo-adithya commented 1 day ago

Hello, any update on this? I think I stumble upon similar issue. I got this error message: can't access property "ReactCurrentOwner", wdyrStore.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED is undefined

vzaidman commented 16 hours ago

Not supported yet. It's very hard to support due to changed APIs and React lifecycle. I've spend many hours but it's still hard to get right. You can follow the progress here: https://github.com/welldone-software/why-did-you-render/pull/301