I have custom Interfaces defined like so
interface Meeting {
Subject: string;
Organizer: string;
StartTime: string;
EndTime: string;
Participants: Participant[] | null;
}
interface Participant {
Name: string;
Title: string;
}
then I have a
const meetings: Meeting[] = // array of Meeting objects
Now I try to send this like so
export const App = ():JSX.Element => {
return <div className="app-container">
<MainView info={meetings}/>
<SideBar/>
</div>
}
Error i get is for "info" , it reads
Type '{ info: Meeting[]; }' is not assignable to type 'IntrinsicAttributes & Meeting[]'.
Property 'info' does not exist on type 'IntrinsicAttributes & Meeting[]'.ts(2322)
What is wrong here and how can I send this prop ?
Also, in receiving component there is
export const MainView = ({info}: Meeting[]):JSX.Element => {return <></>}
and error is again at 'info'
Property 'info' does not exist on type 'Meeting[]'.ts(2339)