I want to change the clicked:false on true. I want to do that in react. How can I do that with Spread operator?
And how can I do that properly?
let questions = [
{
title: "Was möchte ich lernen?",
letters: ["a", "b", "c", "d"],
variants: ["Deutsch", "English", "Franzosisch", "Turkisch"],
clicked: false
},
const [result, setResult] = useState<any>(questions)
<button onClick={()=>setResult(...questions)}></button>