I am having trouble to change the actif value of a certain name. If I click on the tag 'Sport', I would like the 'actif' value in 'Sport' to change to 1 but I am not sure what is the proper way to write it, I have tried many.
const [activeTag, setActivetag] = useState([
{ name: "Music", value: 1, actif: 1 },
{ name: "Sport", value: 2, actif: 0 },
{ name: "VideoGames", value: 3, actif: 0 },
{ name: "Animals", value: 4, actif: 0 },
{ name: "Party", value: 5, actif: 0 },
{ name: "Arts", value: 6, actif: 0 },
{ name: "Movies", value: 7, actif: 0 },
{ name: "Travels", value: 8, actif: 0 },
{ name: "Cooking", value: 9, actif: 0 },
{ name: "Dance", value: 10, actif: 0 },
]);
Thanks in advance!