fullcalendar / fullcalendar-react

The official React Component for FullCalendar
https://fullcalendar.io/docs/react
MIT License
2.09k stars 110 forks source link

do away with import ordering restrictions #144

Closed arshaw closed 1 year ago

arshaw commented 3 years ago

The JS error Please import the top-level fullcalendar lib before attempting to import a plugin will appear if an import statement for a FullCalendar plugin (like @fullcalendar/timeline) goes before the @fullcalendar/react import. That's why the FullCalendar React docs tell you to order your import statements in a certain way:

import React from 'react'
import FullCalendar from '@fullcalendar/react' // must go before plugins
import dayGridPlugin from '@fullcalendar/daygrid' // a plugin!

This ordering restriction is necessary for internal reasons. The goal is to do away with this restriction. Please see the following ticket on the core project's issue tracker to learn more: https://github.com/fullcalendar/fullcalendar/issues/6371

arshaw commented 1 year ago

Fixed in v6.0.0