question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined is not a function (evaluating 'ReactComponentTreeHook.purgeUnmountedComponents()')

See original GitHub issue

Is this a bug report?

(I don’t know but it seems to be)

Have you read the Contributing Guidelines?

(Yes)

Environment

Steps to Reproduce

()

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(I deleted the node_module then i installed used the npm install after i run the app using react-native run-android then i got the error screenshot_1511190209 )

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

6reactions
vchebancommented, Nov 27, 2017

Hello guys. I’ve found solution to this problem:

https://reformatcode.com/code/ios/react-native---reactcomponenttreehookpurgeunmountedcomponents-is-not-a-function

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 react-native@0.48.4 requires a peer of react@16.0.0-alpha.12 but none was installed. (I had a previous version installed because of another warning that I got).

As soon as I installed react@16.0.0-alpha.12 instead, the problem was solved. Apparently facebook has removed the function ReactComponentTreeHook.purgeUnmountedComponents from the code, it is not to be used

It helped me too. Good luck.

1reaction
SerafimCcommented, Nov 23, 2017

Got the same error here. Already tried to update React, react native, all packages and npm but it dont work: undefined is not a function (evaluating ‘ReactComponentTreeHook.purgeUnmountedComponents()’)

I’ll keep up and any news I bring here

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - Undefined is not a function (evaluating ...
Undefined is not a function (evaluating 'ReactComponentTreeHook.purgeUnmountedComponents()' ... To get the best advice here, try to add as much ...
Read more >
Undefined Is Not A Function (Evaluating ... - ADocLib
Undefined Is Not A Function (Evaluating 'Reactcomponenttreehook.Purgeunmountedcomponents()'. We're working on the changelog and you can read the draft here.
Read more >
undefined is not an object (evaluating 'navigation.state') - Reddit
I'm getting "TypeError: undefined is not an object (evaluating 'navigation.state')" when I click on Logout tab button, look at
Read more >
Why Do We Get 'undefined is not a function' in JavaScript?
The error speaks for itself. You want to execute a function. However, what you are trying to execute is evaluated to as undefined...
Read more >
https://www.ancestrycdn.com/family-insights/script...
'undefined') {\n\t console.error(message);\n\t }\n\t try {\n\t ... This node must not be part of a React tree (or is\n\t // unmounted, potentially).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found