title: TypeError: TypeError: undefined is not an object (evaluating 'this.onPressDropdownData(this.data).bind')
body: <p>I want is to record my inputs involving checkbox selection, dropdown selection and everything else into an alert box. I am having trouble with capturing the dropdown selection and checkbox selection into a state and further placing all those inputted details into an alert box.</p>
  
  <p>Below is the code:  </p>
  
  <pre><code>import * as React from 'react';
  import {
      Text, View, StyleSheet, TouchableOpacity, ScrollView, Button
  }
  from 'react-native';
  import {
      Header, Icon
  }
  from 'react-native-elements';
  import {
      Constants
  }
  from 'expo';
  import {
      CheckBox
  }
  from 'react-native-elements';
  
  import {
      createStackNavigator,
      createNavigatorContainer
  }
  from "react-navigation";
  
  import {
      Dropdown
  }
  from 'react-native-material-dropdown';
  
  export
  default class UpdateFrequency extends React.Component {
      static navigationOptions = {
          title: 'UPDATE FREQUENCY',
          style: {
              display: 'flex',
              flexDirection: 'row',
              backgroundColor: "#FFD700"
          }
      };
  
      constructor(props) {
          super(props);
          // this.toggle= this.toggle.bind(this);
          this.state = {
              ischecked: true,
              data: '',
              time: 0
          }
      }
      onChangeCheck() {
          this.setState({
              ischecked: !this.state.ischecked
          });
  
      }
      onPressDropdownData(data) {
          this.setState({
              data: data
          });
  
      }
  
      onPressDropdownTime(time) {
  
          this.setState({
              time: time
          });
      }
  
      render()
  
      {
  
          const data = [{
              value: '3 Hours'
          }, {
              value: '6 Hours'
          }, {
              value: '12 Hours'
          }, {
              value: 'Daily'
          }];
  
          const time = [{
              value: '6 AM'
          }, {
              value: '00:00 HRS'
          }];
  
          return ( &lt; View style = {
                  styles.container
              } &gt;
  
              &lt; Text style = {
                  styles.writeup
              } &gt; Use this page to select how many updates you would like to receive at once. &lt; /Text&gt;
  
          &lt;View style={StyleSheet.create({flex:1})}&gt;
  
  
          &lt;CheckBox style={styles.one}
              center
              title="Receive Simultaneously"
              checkedIcon="dot-circle-o"
              uncheckedIcon="circle-o"
              checked={this.state.ischecked}
              value={this.state.ischecked}
              onPress={this.onChangeCheck.bind(this)}
            / &gt;
  
              &lt; Dropdown label = '# Updates to Receive'
              data = {
                  data
              }
              onPress = {
                  this.onPressDropdownData(this.data).bind(this)
              }
              /&gt;
  
  
          &lt;Dropdown
          label='Delay Between Updates'
          data={time}
          onPress={this.onPressDropdownData(this.data).bind(this)}
          / &gt;
  
              &lt; TouchableOpacity style = {
                  styles.adsense
              }
              onPress = {
                  () = &gt; {
                      alert('Receive simultaneously : ' + this.state.ischecked + '\n' + 'No. of updates to receive : ' + this.state.data + '\n' + 'Delay between updates : ' + this.state.time);
                  }
              } &gt; &lt; Text &gt; Show recorded inputs &lt; /Text&gt;
          &lt;/TouchableOpacity &gt;
  
              &lt; /View&gt;
  
          &lt;TouchableOpacity style={styles.adsense}&gt;
          &lt;Text&gt;Adsense Ad&lt;/Text &gt; &lt; /TouchableOpacity&gt;
  
  
        &lt;/View &gt;
          );
      }
  
  }
  
  const styles = StyleSheet.create({
      container: {
          flex: 1,
          display: 'flex',
          flexDirection: 'column'
      },
  
      writeup: {
          flex: 0.3,
          backgroundColor: '#FFE4B5',
          justifyContent: 'center',
          alignItems: 'center',
          padding: 8
      },
      adsense: {
          flex: 0.55,
          justifyContent: 'center',
          alignItems: 'center',
          backgroundColor: '#778899',
      },
  
  });
  
  </code></pre>