Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: aligns first render for hydration of dates in list view (#10541)
### What? The list view was throwing a hydration error for date fields. ### Why? The issue really stems from the fact that cells are client rendered. We dynamically load the dateFNS Locale object at runtime to keep the bundle size small — which makes sense. But on the first render that means we do not have the Locale object from the known locale so the server/client determines what to render it as. This causes a mismatch when hydrating. In the future I think cells could be server rendered and that would solve the need for this fix which adds "Loading..." while the dateFNS Locale is loaded. I think server rendering the cells would allow us to import the dateFNS Locale inline (blocking) and then pass the rendered string down to the list view. This should work because we **know** the locale on the server. ### How? In this PR, it adds a "Loading..." fallback for the date cell if the dateFNS Locale has not loaded yet. Fixes #10044
- Loading branch information