I tried to implement a React calendar with local storage and the FullCalendar library using the below code.
<FullCalendar
plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}
initialView="timeGridWeek"
headerToolbar={{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
}}
events={calendarEvents}
editable={true}
eventClick={handleEventClick}
/>
However, I’m getting the following error:
Error: 'FullCalendar' cannot be used as a JSX component.
Its type 'typeof FullCalendar' is not a valid JSX element type.
Type 'typeof FullCalendar' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any, any, any>'.
Type 'FullCalendar' is missing the following properties from type 'Component<any, any, any>': context, setState, forceUpdate, props, refs
The suggested posts just offer specific solutions but not the general approach to this issue.
New contributor
Ahmed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1