0

I was wondering if i can pass a callback to the datesSet's method of FullCalendar, callback that will set a state. I tried this already, and it ended up making my page reload untill the browser asked me to close the page or wait. Also, i have seen that FullCalendar documentation recommends using day-header or day-cell render hooks, but they are not what i'd really need.

Thanks!

1 Answers1

0

Yes you can pass a callback function in a setState. Actually this is very common to do it.

setState(prevState => prevState + 1)

For example.

Ethanolle
  • 1,106
  • 1
  • 8
  • 26
  • I created myself another react project containing just a FullCalendar and a state to change inside the datesSet and it worked! Also, i figured out the problem in my project: -> If inside FullCalendar's options, i have the "locales: [roLocale]", the page will not be able to load anymore. Thanks for your help! – Mihai Pescaru May 30 '21 at 13:07