Firstly apologies not sure if this is specific to Mantra, ES6, NPM or Babel - I am used to just running a meteor command to add a package and it just working.
I was trying to use the NPM package for FullCalendar in a react component. I install the package with npm install --save fullcalendar
and in the the component.jsx included an import reference below the react reference
import React from 'react'
import FullCalendar from 'fullcalendar'
the package.json seemed to include fullcalendar and Jquery / $ is available in the javascript console
However when it comes to access the plugin it throws an undefined error.
$(selector).fullCalendar() -> error fullCalendar is undefined.
Can someone help as to how I might resolve this. I think the problem is probably due to a lack of knowledge on my part and also specific to how jquery plugins are imported / used in an npm context.
How to use Jquery plugins in Mantra?
Firstly apologies not sure if this is specific to Mantra, ES6, NPM or Babel - I am used to just running a meteor command to add a package and it just working.
I was trying to use the NPM package for FullCalendar in a react component. I install the package with npm install --save fullcalendar
and in the the component.jsx included an import reference below the react reference
import React from 'react' import FullCalendar from 'fullcalendar'
the package.json seemed to include fullcalendar and Jquery / $ is available in the javascript console
However when it comes to access the plugin it throws an undefined error.
$(selector).fullCalendar() -> error fullCalendar is undefined.
Can someone help as to how I might resolve this. I think the problem is probably due to a lack of knowledge on my part and also specific to how jquery plugins are imported / used in an npm context.
Thanks