Trying to change color of a button pressed from a dynamic list using useRef to uplift the state [React Native]
I am trying to change the color of a button pressed from a dynamic json list using useRef. But when I use the useRef it is only aiming at the last value of the list.But if I add array in…