#How to Import antd's CSS in remix so antd components can use them in initial render?

1 messages · Page 1 of 1 (latest)

polar trellis
#

I am getting a react hydration error for my website which uses antd components. But the Css required for 'antd' is not loaded initially but it applies after a reload or in the upcoming renders

My question is how would i import css beforehand so that my antd components can use them?

i referred this forum but i dont exactly know how to achieve this in my remix application?https://stackoverflow.com/questions/54736207/ant-design-css-not-loading-properly

a stackblitz example or a snippet could help a lot 🥹

spice lichen
#

@polar trellis - did you figure this out?

#

regarding this statement:

But the Css required for 'antd' is not loaded initially but it applies after a reload

how did you find this out? Are you seeing a flash of unstyled content before the render error happens?

I'm seeing this happens sometimes in our remix app at work in some apps - but not others as well -- at least these errors:

cannot read properties of null  ...