Uncaught TypeError: Cannot read property 'ReactCurrentOwner' of undefined
See original GitHub issueI’m new to React Motion, and spent all day yesterday trying to get what I need. However, I can’t figure out what has caused this issue
Uncaught TypeError: Cannot read property 'ReactCurrentOwner' of undefined
I’ve been playing around with the demos and currently this is what I have. If this is not enough code, please let me know!
getStyles() {
const endValue = this.state;
return [endValue];
},
render() {
return (
<TransitionMotion
styles={ this.getStyles }
willEnter={() => null}
willLeave={() => null}>
{ball =>
<div className="demo1">
<div
key="demo1"
className={`demo1-ball ball-0`}
style={{
WebkitTransform: `translate3d(${ball[0].x - 25}px, ${ball[0].y + 25}px, 0)`,
transform: `translate3d(${ball[0].x - 28}px, ${ball[0].y - 54}px, 0)`,
}} />
)}
</div>
}
</TransitionMotion>
);
},
What is causing the error?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:24
Top Results From Across the Web
Cannot read property 'ReactCurrentOwner' of undefined ...
TypeError : Cannot read property 'ReactCurrentOwner' of undefined. The error does not seem to be caused by my code, but either by ...
Read more >Cannot read property 'ReactCurrentOwner' of undefined #83
It is a global npm module that can be used to update your dependencies, such as react or react-dom, in your package.json file....
Read more >Unit tests - Mattermost Developers
If you get an error like UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'filter' of undefined. Check if the code being tested used native ...
Read more >How to Read React Errors (fix 'Cannot read property of ...
This error usually means you're trying to use .map on an array, but that array isn't defined yet. That's often because the array...
Read more >Cannot read property 'ReactCurrentOwner' of undefined ...
Coding example for the question TypeError: Cannot read property 'ReactCurrentOwner' of undefined-React Native.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try deleting your node_modules folder and run yarn or npm install again, then rerun your build process / file watcher.
This error might happen if two separate versions of react-dom are loaded, e.g., by oneself (index.js) and another dependency (react-apollo) on the server side when used for SSR. Are you trying to render react-motion on the server side?
I also had the problem with React 15 and jest, but updating to 16 was not an option. Downgrading react-test-renderer to ^15 worked though.