< button onclick = {this.btn (data)} > Btn < / button >
/ / Why do you run this function
btn = (data) = > {console.log (data)}
/ / then
btn = (data) = > () = > {console.log (data)}
/ / however, when parameters are not passed
< button onclick = {this.btn} > Btn < / button >
/ / this is normal
btn = () > {console.log (111)}
* can you take a look at this for me if the bosses have time? https://mp.weixin.qq.com/s/rB...
I know this binding method only after reading this, saying that my original binding method is wrong, but I don"t understand why this binding function is written in this way. I am a rookie, and I hope the boss who is free can tell me more details
I"d like to ask the boss:
1: btn = (data) = > () = > {console.log (data)} what function is this?
2: can you explain the demo above for me?