I have written some code with the intention of concatenating two strings later on. However, I am struggling to update the state properly using a handleChange function. The error message I'm receiving states that "A spread argument must either have a tuple type or be passed to a rest parameter." It seems like my approach to updating the state is incorrect. Can anyone provide guidance on how to handle this issue?
const [link, SetLink] = useState<{ site: string[] }>({ site: ['https://www.somesite.com/', ''] });
SetLink(...link.site[1], (link.site[1] = target.value));