Adds :component-will-unmount, which clears watches and calls Pikaday.destroy.
I actually used this to make cljs-pikaday reload i18n by using a React key bound to selected locale (so that React recreates the component on locale change). Might be neat to have ability to change i18n data on the fly (like the date-atom), but didn't spend too much time on finding a neat way and this solution allows to export the decision for reloading pikaday opts to external code :)
Adds :component-will-unmount, which clears watches and calls
Pikaday.destroy
.I actually used this to make
cljs-pikaday
reloadi18n
by using a React key bound to selected locale (so that React recreates the component on locale change). Might be neat to have ability to changei18n
data on the fly (like thedate-atom
), but didn't spend too much time on finding a neat way and this solution allows to export the decision for reloading pikadayopts
to external code :)