undefined is not an object evaluating _this._setComponentRef.bind
See original GitHub issue## Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 752.25 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.6.0 - ~/.nvm/versions/node/v10.6.0/bin/node
Yarn: 1.10.0 - ~/.yarn/bin/yarn
npm: 6.1.0 - ~/.nvm/versions/node/v10.6.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 27.0.3, 28.0.1
API Levels: 23, 25, 26, 27, 28
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
@types/react: ^16.4.14 => 16.4.14
@types/react-native: ^0.57.0 => 0.57.0
react: 16.5.2 => 16.5.2
react-native: 0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native: 0.57.1
Hi, I still getting an old issue about undefined is not an object evaluating _this._setComponentRef.bind
I tried adding "@babel/plugin-transform-flow-strip-types": "^7.0.0"
to package.json
and set my babel.config.js to
module.exports = {
'presets': [
'module:metro-react-native-babel-preset',
'module:react-native-dotenv',
],
'sourceMaps': true,
'plugins': [
'@babel/transform-flow-strip-types',
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/transform-runtime'
],
};
any other ideas? seems like this happing in TouchableOpacity onPress property…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[0.56] undefined is not an object (evaluating '_this ... - GitHub
setComponentref.bind) #19763. I tried to solve the problem using some of the linked solutions and was not able to make any progress.
Read more >undefined is not an object (evaluating 'this.handleMapView ...
The weird thing is that, if I bind directly from the render method it works but the moment i try calling a method...
Read more >undefined is not an object (evaluating 'this._callListeners.bind ...
Coding example for the question TypeError: undefined is not an object (evaluating 'this._callListeners.bind')-React Native.
Read more >React Recipe Box '_this2' Problem(SOLVED)
deleteRecipe') or TypeError: undefined is not an object (evaluating '_this2.state') depending on what directly follows 'this'. Basically it has ...
Read more >ERROR TypeError: undefined is not an object (evaluating ...
Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') whilst working hard on your project?
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 Free
Top 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
React Native sucks so much, it’s unbelievable how much effort it takes to make things even work.
80% react native problems 20% you actually code your app
The problem is, if we want to use realm, we have to use 0.57 for some compatibility reason