I get this error message when I use react-native run-ios
or just build for iOS:
ReactComponentTreeHook.purgeUnmountedComponents is not a function. (In 'ReactComponentTreeHook.purgeUnountedComponents()', 'ReacComponentTreeHook.purgeUnmountedComponents' is undefined)
I have used CRNA and ejected. I have also used react-native-push-notification
and react-native-beacons-manager
and followed the instructions of both. The project works when I run it in Android.
I have read here that it depends on the fact that I am using the minified version of react
and unminified version of react-dom
but I don't see where I can change that when it comes to React Native.
How do I solve this?
In the end, I figured that the versions of react
and react-native
packages that I were installed didn't "match". I saw the message npm WARN [email protected] requires a peer of [email protected] but none was installed.
(I had a previous version installed because of another warning that I got).
As soon as I installed [email protected]
instead, the problem was solved. Apparently facebook has removed the function ReactComponentTreeHook.purgeUnmountedComponents
from the code, it is not to be used anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With