React Native - Undefined is not an object(evaluating 'item.menu_desc')

undefined is not an object (evaluating 'this.props.navigation.navigate') in react native
react native typeerror undefined is not an object (evaluating
react typeerror undefined is not an object (evaluating)
typeerror: null is not an object react-native
undefined is not an object (evaluating '_reactnative tabbarios item)
createstacknavigator undefined is not an object
undefined is not an object (evaluating activesections includes)
undefined is not an object (evaluating native navigationhelperscontext provider)

I'm trying to send some data to my database, but the data is also from my database. By pressing the send button the item/data that is displayed should be sent/added to the database.

I tried to use this.setState({ name: item.menu_desc }) but it gave me this error:

Here's my code

export default class Dishes extends Component {
    constructor(props) {
        super (props)
        this.state = {
            ....
            ....
            name: null,
            menu_price: null,
        }
    }
    submit = ({ item, index }) => {
        this.setState({ name: item.menu_desc });          // my setStates
        this.setState({ menu_price: item.menu_price });
                fetch('http://192.168.***.***:3308/SendOrder/Send', {
                    method: 'POST',
                    headers: {
                        'Accept': 'application/json',
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify({
                        ....
                        menu_desc: item.menu_desc,
                        menu_price: item.menu_price,
                    })
                }).then(res => res.json())
                    .then((responseJson) => {
                        Alert.alert(JSON.stringify(responseJson))
                        console.log(responseJson);
                    })
                .catch(error => console.error('Error:', error))
    }
        return (
            <View>
                .....
                <Text>Name: { item.menu_desc }</Text>       // This is name
                <Text>Price: ₱{ item.menu_price }</Text>    // This is price
                <Text>Status: { item.menu_status }</Text>
                .....
                <TouchableOpacity
                onPress = {(item,index) => this.submit(item,index)}>
                    <Text>Send Order</Text>
                </TouchableOpacity>
            </View>
        )
    }
    render() {
        return (
                <FlatList
                    data = {this.state.data}
                    keyExtractor={(item, index) => index.toString()}
                    extraData={this.state}
                    renderItem = {this._renderItem}
                />
            </View>
        )
    }
}


you are calling this.submit(item,index)

where item is the first variable and index is the second variable. But the submit function tries to destructure the item object like so.

submit = ({ item, index }) => {

remove the curly braces or send the arguments as an object.

TypeError: undefined is not an object (evaluating '_reactNative , 8. React Native version: 0.59.8 info. React Native Environment Info: System: OS: macOS 10.14.4. CPU: (  react native version: react-native@0.25.1 lsps9150414 changed the title undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants') [iOS] undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants') on Jun 2, 2016 brettpappas commented on Jun 3, 2016 I'm having the same problem.


The error is telling you that item is undefined, therefore you can't call .menu_desc on it since it's not an object.

The inline function in TouchableOpacity should look like this: (Notice how you don't actually need any argument in the anonymous inline function)

<TouchableOpacity
  onPress = {
    () => {
      this.submit(item, index)
    }
  }
>

And since submit() takes in 2 arguments, you don't need the destructuring:

submit = (item, index) => {
  ...
}

undefined is not an object problem · Issue #1569 · react-navigation , undefined is not an object (evaluating this.props.navigation.navigate) here: https://facebook.github.io/react-native/docs/navigation.html. $ react-native run-android React Native has changed its Android application template in 0.29 which result in rnpm link not working with RN 0.29.0, and 0.29.1. However we've fixed this problem by adding custom rnpm. 👍


  1. Close emulator
  2. Kill all node.exe processes
  3. remove all files in temp
  4. remove node_modules
  5. install babel-plugin-transform-flow-strip-types
  6. npm install
  7. react-native start --reset-cache
  8. react-native run-android

ReactNative: [TypeError: undefined is not an object (evaluating , ReactNative: [TypeError: undefined is not an object (evaluating 'BlinkIDNative.​scanWithCamera')]. Technical Support team Microblink January  When I open it on Expo, I get the error: "undefined is not an object (evaluating 'this.props.navigation.navigate)'". Any help? It's a bit frustrating that the example from the documentation does not work :)


React native Animated undefined is not an object (evaluating 'u , I'm having the following problem: "undefined is not an object (evaluating 'u.​stopTracking')". It happens when on Expo I update a props, I tried to use on  Problema com setState em React Native: “Can't call 'setState' on a component that is not yet mounted.” 0 undefined is not an object (evaluating '_this.props.navigation.navigate') React Native


undefined is not an object (evaluating 'RNGestureHandlerModule , Ever since React Navigation 3 came out it needs react-native-gesture-handler in order to work. This error usually pops up if Gesture Handler isn't  My solution was to wipe out emulator data or try react-native run-android on a completely new emulator. I installed and linked react-native-gesture-handler while my emulator was active and I thought re-running run-android would reset all cache but the emulator app needs to be removed and data wiped out and then try again.


react native TypeError: TypeError: undefined is not an object , react native TypeError: TypeError: undefined is not an object (evaluating'_this.​state.cartAmount') - react-native. React Native Noob here. In Android only, Keychain.getGenericPassword() causes undefined is not an object (evaluating 'RNKeychainManager.getGenericPasswordForOptions') at this location.