title: How to dynamically add a text input in React Native
body: <p>How can I add a text input in React Native with the click of a button? For example, I would press the "+" button and it would add a text input at the bottom of the View.</p>
  
  <p>EDITED:
  Here is my code (deleted all the irrelevant stuff). Not working for some reason. Clicking the button doesn't do anything.</p>
  
  <pre><code>    import React, { Component, PropTypes } from 'react';
      import { StyleSheet,NavigatorIOS, Text, TextInput, View, Button, 
               TouchableHighlight, TouchableOpacity, ScrollView, findNodeHandle, 
               DatePickerIOS} from 'react-native';
      import TextInputState from 'react-native/lib/TextInputState'
  
      export default class App extends React.Component {
        constructor(props) {
          super(props);
          this.state = {textInput: [],
            date: new Date(),
          } 
        }
  
        addTextInput = (key) =&gt; {
          let textInput = this.state.textInput;
          textInput.push(&lt;TextInput key={key} /&gt;);
          this.setState({ textInput })
        }
  
        render(){
          return(
            &lt;View&gt;
              &lt;Button title='+' onPress={() =&gt; 
                 this.addTextInput(this.state.textInput.length)} /&gt;
              {this.state.textInput.map((value, index) =&gt; {
                return value
              })}
            &lt;/View&gt;
          )
        }
      }
  </code></pre>