Q:

TypeError: undefined is not an object (evaluating '_this.state = { showAddress: false}')

I am just trying the set the state variable to false, but I keep getting an error message 
TypeError: undefined is not an object (evaluating '_this.state = {
        showAddress: false
      }')

I have hunted the internet for an answer on this and this error seem to be quite common in a general term. I have tried binding it to the function but nothing I do seem to change that error message.
import React, { Component } from 'react';
import { StyleSheet, Text, View, TextInput, TouchableHighlight, Alert} from 'react-native';

export default class PickupLocation extends React.Component {

    constructor() {

        this.state = {
            showAddress: false
        };

       /* this.submitAddress = this.submitAddress.bind(this);
        this.renderSubmitAddress = this.renderSubmitAddress.bind(this);*/
    }

    submitAddress = () => {
        this.setState({
            showAddress: !this.state.showAddress
        })
    } 

    renderSubmitAddress = () => {
        if(this.state.showAddress){
            return (
                <View><Text>Jason Was Here</Text></View>
            )
        } else {
            return null;
        };
    }

    render() {
        return (
                <View style={styles.textArea} >
                <View>
                <TextInput
                    style={{height: 40, borderColor: 'gray', backgroundColor: 'white', borderWidth: 1}}
                    onChangeText={(text) => this.setState({text})}
                    placeholder="What is your pickup point?"
                    placeholderTextColor='grey'
                    onSubmitEditing={this.submitAddress()}
                /> 
                {this.renderSubmitAddress()}    
                <View style={styles.Button} >           
                <TouchableHighlight buttonStyle={styles.Button} title="Press Me" 
                        onPress={() => {Alert.alert("jason is testing");}} >
                        <Text style={styles.submitText}>Submit Pickup Location</Text>
                </TouchableHighlight>
                        </View> 
                </View>
            </View>  
            )
        }
    }

I will most likly get a duplicate on this question but I ave tried everything I could find here and none of the answers seem to change anything.
Thanking you in advance for any help.

A:

You need to call super() in your constructor.
constructor() {
    super();
    this.state = {
        showAddress: false
    };

}

Additionally, there are a couple of other items that should be fixed.
When you access the current state in a setState call, you should use the version that takes a function as an argument, like so:
submitAddress = () => {
        this.setState((prevState) => ({
            showAddress: !prevState.showAddress
        }))
    } 

Also, the handler you're passing to onSubmitEditing should be modified:
onSubmitEditing={this.submitAddress.bind(this)}

