Looking at
- Compile and Bundle ESM Components — Panel v1.5.1
- ReactComponent — Panel v1.5.1
- React Component - Docs | FullCalendar
What am I missing or is this a bug?
I get
react-dom.production.min.js:188 TypeError: Class constructor ee cannot be invoked without 'new'
at oe.render (internal-common.js:2442:13)
at O (index.js:197:13)
at Q (children.js:137:3)
at O (index.js:230:4)
at Q (children.js:137:3)
at O (index.js:230:4)
at Q (children.js:137:3)
at O (index.js:230:4)
at Q (children.js:137:3)
at ue (index.js:436:4)
ri @ react-dom.production.min.js:188
import panel as pn
from panel.custom import ReactComponent
pn.extension()
class SimpleFullCalendar(ReactComponent):
_esm = """
import FullCalendar from 'https://esm.sh/@fullcalendar/react@6.1.8';
import dayGridPlugin from 'https://esm.sh/@fullcalendar/daygrid@6.1.8';
export function render() {
return (
<FullCalendar
plugins={[ dayGridPlugin ]}
initialView="dayGridMonth"
/>
)
}
"""
_stylesheets = [
"https://cdn.jsdelivr.net/npm/@fullcalendar/core@6.1.8/main.min.css",
"https://cdn.jsdelivr.net/npm/@fullcalendar/daygrid@6.1.8/main.min.css",
]
calendar = SimpleFullCalendar()
calendar.show()