React event parameter passing?

is written in es6. The this of the function is handled by bind (this) in constructor.

but the question is: what about passing event parameters in
map traversal?

this.func (item) / / this doesn"t work. It"s OK to execute the function
this.func.bind (this,item) / / directly, but it"s not good enough. After all, I"ve already dealt with it in the constructor!
e = > this.func (item) / / current mode

question:
is there a better way to deal with it? Ask for recommendation!

Mar.10,2021

you've already said to use es6, so don't use bind in constructor .
just use () = > {} directly.


e = > this.func (item) / / current mode


I don't quite understand what the event in map traversal means. If we traverse it directly, we can get the parameter directly in the function:


<blockquote>this.func(item) //<br>this.func.bind(this,item) //<br>e=>this.func(item) //</blockquote>
onClick={this.func(item)}

// 
func = (item) => () => {
    // ...
}
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-1e45382-4c221.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-1e45382-4c221.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?