My React component has a prop called propWhichIsArray which will be an array of objects. These objects will have an id which is an ID and text which is a string. How can you type this with TypeScript?
type Props = {
propWhichIsArray: {
id,
text: string;
}[]
};
const Component: React.FC<[Props]> = ({ propWhichIsArray }) => {
//
Im getting an error:
Property 'propWhichIsArray' does not exist on type '[Props] & { children?: ReactNode; }'. TS2339