It's useful because flatpickr-calendar is appended not in it's parent component but in parellel of react "root", so when you changes it's css, it's affect everywhere, you can't do like:
.myClass .flatpickr-months{ /* some stuff */ }
because it's not under your myClass class.
if you use the solution then your class will be added where the flatpickr-calendar is.
As threre is no answer to this question in react-flatpickr, I just want to reference the answer from flatpickr repo:
https://github.com/flatpickr/flatpickr/issues/1263#issuecomment-369741437
It's useful because flatpickr-calendar is appended not in it's parent component but in parellel of react "root", so when you changes it's css, it's affect everywhere, you can't do like:
.myClass .flatpickr-months{ /* some stuff */ }
because it's not under your myClass class. if you use the solution then your class will be added where the flatpickr-calendar is.Hope this helps!