Here is the code snippet for React component:
handleChange(e) {
this.setState({ value: e.target.value });
}
render() {
return (
<div className="MarkdownEditor">
<h3>Input</h3>
<label htmlFor="markdown-content">
Enter some markdown
</label>
<textarea
id="markdown-content"
onChange={this.handleChange}
defaultValue={this.state.value}
/>
</div>
);
}
}
Here in handleChange(e)
function what is the use of e
and how does it get derived?