Answers for "how to get the value of textarea in react"

1

how to get the value of textarea in react

getInitialState: function() {
    return {value: 'Hello!'};
  },
  handleChange: function(event) {
    this.setState({value: event.target.value});
  },
  render: function() {
    return (
      <input
        type="text"
        value={this.state.value}
        onChange={this.handleChange}
      />
    );
  }
Posted by: Guest on February-04-2021

Code answers related to "how to get the value of textarea in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language