React Typescript Set Type

interface MyFooType {
    value: string;
}

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

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