title: getting NaN in react native text input
body: <p>I am trying to parcel the value of one text input into another text input with a restricted maxLength of 2, when I type in a number and clear it, I am getting NaN, it does not revert back to the original state of 0.
  However, I also want the user to be able to clear out the textinput completely thereby leaving the textinput with just the placeholder</p>
  
  <p>below is my code</p>
  
  <pre><code>      this.state = {
          total: 0,
        }
  
  
        onChangeTotal(number) {
          const total = parseInt(number);
          this.setState({ total });
        }
  
  
  
        &lt;InputField
          value={this.state.total.toString()}
        /&gt;
        &lt;InputField
          children={'Number of shoes'}
          iconType={'ios-basket'}
          placeholder={'Enter number of shoes'}
          keyboardType={'phone-pad'}
          maxLength={2}
          onChangeText={this.onChangeTotal}
          value={this.state.total.toString()}
        /&gt;
  </code></pre>