score:12

Accepted answer

if you strongly type the generic param for usestate you're all good

const [state, setstate] = usestate<{ array1: string[] }>({ array1: [] });

Related Query

More Query from same tag