React/redux Manage State Locally First :Why are the tests failed

Tell us what’s happening:
I’m a bit confused because my code seems to work, and yet it fails most of the tests. Thanks if you take a look!

Your code so far


class DisplayMessages extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: '',
      messages: []
    }
    this.submitMessage = this.submitMessage.bind(this);
    this.handleChange = this.handleChange.bind(this);
  };
  // add handleChange() and submitMessage() methods here


  submitMessage() {
    this.setState({input:'',messages:this.state.messages.concat(this.state.input)});
  };
  handleChange() {
    this.setState({input:document.getElementById("input").value});
  };
  render() {
    return (
      <div>
        <h2>Type in a new Message:</h2>
        { /* render an input, button, and ul here */ }
        <input id="input" value = {this.state.input} onChange = {this.handleChange}/>
        <button onClick = {this.submitMessage}>Add messages</button>
        <ul>{this.state.messages.map(x => <li>{x}</li>)}</ul>

        { /* change code above this line */ }
      </div>
    );
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36.

I solved the problem by using event.target.value instead of getDocumentById