title: How to set input value to null in react
body: <p>Why I can't set target value to null if target value is empty str ?</p>
  
  <p>here is my code, hope you'll help me: </p>
  
  <pre><code>   class Input extends React.Component {
        constructor(props) {
          super(props);
          this.onInputChange = this.onInputChange.bind(this);
        }
  
        onInputChange(event) {
          const fieldValue = event.target.value;
          if (!fieldValue) {
            event.target.value = null;
          }
          this.props.onChange(event);
        }
  
        render() {
          return &lt;input value={this.props.value} onChange={this.onInputChange} /&gt;;
        }
      }
  </code></pre>