Tell us what’s happening:
I want when I click the button, state.text will be reset to the empty string. But when I click to the area of font awesome, it’s not working. Help me, please!!!
This is my project http://pauker.freevnn.com/
Your code so far
handleClick = event => {
if (event.target.value === 'clear')
this.setState({ text: '' });
}
render() {
return (
<button type="button" id="clear" value="clear"
onClick={this.handleClick}>
<span className="fas fa-arrow-left" />
</button>
)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) coc_coc_browser/80.0.180 Chrome/74.0.3729.180 Safari/537.36
.
Link to the challenge: