I’m building a calendar app for my organization and need help linking Google Calendar events to my FullCalendar component. I’ve been searching the docs but can’t find clear examples for React JSX integration.
"use client";
import { useState, useEffect } from 'react';
import CalendarView from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
const EventCalendar = () => {
const [calendarEvents, setCalendarEvents] = useState([]);
return (
<div className="calendar-container p-4">
<CalendarView
plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}
initialView="dayGridMonth"
headerToolbar={{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek'
}}
events={[
{ title: 'Team Meeting', date: '2025-02-05' },
{ title: 'Workshop', date: '2025-02-08' }
]}
/>
</div>
);
};
export default EventCalendar;
I’ve tried various approaches but nothing seems to work properly. Has anyone successfully connected Google Calendar data to FullCalendar in a React project?