How React.js events are bound

< 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?

Apr.28,2022

one point: the event binds the function , not the execution of the function .

// 
btn = () => { console.log( 111 ) }
<button onclick = { this.btn }>Btn</button>

// 
btn = () => { console.log( 111 ) }
<button onclick = { this.btn( data ) }>Btn</button>

// btn
btn = ( data ) => () => { console.log( data ) }
<button onclick = { this.btn( data ) }>Btn</button>

-sharp-sharp-sharp higher order function-function Corialization

The return value of the

/ / function is still a function
let add = (x) = > (y) = > {return x + y}; add (1) (2);

is the same as the following method;
let add = function (x) {

return function(y){
    return x+y;
}

}; add (3) (4);

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4912a-44248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4912a-44248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?