React binds events through external arrow functions, how to pass parameters?

the code is as follows:

handleSwitchColor = (color) => {
    console.log(color);
    const {store} = this.context;
    store.dispatch({
      type: "CHANGE_COLOR",
      themeColor: "red"
    })
  };
  render () {
    return (
      <div>
        <button
          style={{ color: this.state.themeColor }}
          onClick={() => this.handleSwitchColor}
        >Red</button>
        <button
          style={{ color: this.state.themeColor }}
          onClick={this.handleSwitchColor}
        >Blue</button>
      </div>
    )
  }

ask:

The handleSwitchColor function has been bound to button through the arrow function in the
code, but how do you pass parameters to this function in this way?
this.handleSwitchColor() // 

do not use onClick= {() = > this.handleSwitchColor} first. This will instantiate a high-order function every time, causing performance problems on your page (if a page has thousands of such arrow functions), you should do this


<button
  style={{ color: this.state.themeColor }}
  onClick={() => {
    this.handleSwitchColor(...)
}}
>Blue</button>

or

<button
  style={{ color: this.state.themeColor }}
  onClick={this.handleSwitchColor.bind(this, ...)}
>Blue</button>
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-1b3aa72-2c222.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-1b3aa72-2c222.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?