let [_value, setValue] = useState([1, 2, 3, 4, 5, 1, 2, 3, 4, 5 ]);
In this code, if I want to change the _value[3] how can I change value using setValue?
In my project, I have to change the _value[index] when the (rating) button is clicked.
So I have to dynamically change the _value[index].
If you know the answer, please let me know. Thank you!
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment