Please could you tell me whats wrong with my handleNoteChange function?
It outputs the last error:
- The onChange prop of the textarea should set entered string to state field note followed with string length
the Code:
`import React from 'react';
class App extends React.Component {
state = {
note: '',
}
handleNoteChange = (event) => {
const {target: {value}} = event;
const noteLength = value.length
this.setState({note: value, noteLength});
}
render(){
const {note} = this.state;
return(
<textarea value={note}
placeholder="My secret diary"
onChange={this.handleNoteChange}
/>
)
}
}
export default App;
`