React.js and arrow functions vs normal functions [duplicate]
问题 This question already has an answer here : Are 'Arrow Functions' and 'Functions' equivalent / exchangeable? (1 answer) Closed last year . I was working on a react.js app and I initially used the arrow function which worked, but then just out of curiosity I decided to try the normal function and the normal function didn't work. I think that they both should output the same thing, what is going wrong? handleChange = event => this.setState({init: event.target.value}) handleChange(event){ this