I am new to react and i am trying to use the useState hook to change the color of a button when clicked. Please how do i go about it . Here is the code below
import { Button } from 'bootstrap'
import React, { useState } from 'react'
import "../workout/style.css"
const [buttonColor, setButtonColor] = useState()
function Workout() {
let buttonColor = document.getElementsByClassName("button")
return (
<div>
<div class="container">
<button className="button">BODYWEIGHT</button>
<button className="button">BARBELL</button>
<button className="button">DUMBELLS</button>
<button className="button">KETTLEBELLS</button>
<button className="button">STRETCHES</button>
</div>
</div>
)
}
export default Workout