You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
date-fns has the function setDefaultOptions to set the locale globally. This safe the effort for passing the locale to every format function in order to get the date in the users locale.
Is there a way to use the setDefaultOptions using the i18next locale so that there are no hydration errors if the server has a different locale than the client?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
date-fns
has the functionsetDefaultOptions
to set the locale globally. This safe the effort for passing the locale to everyformat
function in order to get the date in the users locale.Is there a way to use the
setDefaultOptions
using thei18next
locale so that there are no hydration errors if the server has a different locale than the client?Beta Was this translation helpful? Give feedback.
All reactions