how to call a function in react with arguments onclick

JavaScript
<button onClick={() => sayHello('James')}>Greet</button>
Source

Also in JavaScript: