In this lesson, we use React and the FullCalendar.js JQuery plugin to demonstrate how you can use complex JQuery plugins to create dynamic React components.
Great article. Since componentDidMount is called only once, how would you change the calendar once rendered? For example, what if the events array needs to come from somewhere in the application (e.g. a Reflux Store or other central spot). Where do you "re-render" the fullCalendar events? Thanks!
Hey there Eric, in terms of re-rendering the component, you'd insert a
componentDidUpdate() call into the calendar component. From that, you'd then be able to
calendar.fullCalendar('rerenderEvents') (the calendar DOM node). You'd be able to pass the data from a Store in the parent component (connected to the store), if you so choose. Hope this was helpful!
Should we be using Portals in this case
Very helpfull. Could you advise as well on using things like drag and drop events onto the component?
Something like this example? How would that be achievable? Thanks!
Something like this for meteor?