using react hooks onclick return a div react.js code example Example: react button onclick <button onClick={sayHello}>Click</button>