What I want to do is when I type some text in an input field, it should appear in another place realtime.
Below is my input;
I think @Richard Garside is correct.
I suggest some changes to clear even more the code.
Change this
onChange={(e) => this.update("field2", e)}
To this
onChange={this.handleOnChange}
And also, change this
this.setState({ [name]: e.target.value });
To this
this.setState({ [e.target.name]: e.target.value})
Besides, you have to add the "name" attribute to the field with a value that relates with the key on the state object.