UseEffect doesnt update buttons array – Reactjs
I have created a BMI calculator app and I want it to change one of the 6 buttons from "btn-primary" to "btn-danger" colors depending on the BMI answer. but after calculation, no button changes color but the answer changes immediately.…