React TypeScript -Set -Typ reagieren

interface MyFooType {
    value: string;
}

const [foo, setFoo] = useState<MyFooType>(); // if not array

const [foo, setFoo] = useState<MyFooType[]>([]); // if it's an array
Zwazel