xenial-black
xenial-black4mo ago

Major flashing before css applies

I'm making my first app with refine + remix + antdesign. My form flashes terribly (i.e., it is just an unformatted mess until the css is fetched and applied). It takes about one or two seconds to look correct. Really terrible. I must be doing something wrong, but I can't imagine what it is.
4 Replies
kapa.ai
kapa.ai4mo ago
Hi @oshiri3676. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, it seems like your issue might be related to how your CSS is being loaded or applied in your application. You might want to check how you're importing your CSS files in your application. If you're using Ant Design with Refine, you should be importing the necessary CSS files as shown in the Refine Ant Design integration documentation (https://refine.dev/docs/ui-integrations/ant-design/introduction#usage). If you're using Next.js, you might want to check out the Ant Design documentation on using it with Next.js (https://ant.design/docs/react/use-with-next#using-pages-router), as suggested in a Discord support thread (https://discord.com/channels/837692625737613362/1164544118932906065). If the issue persists, I recommend reaching out to the Refine community on Discord (https://discord.com/channels/837692625737613362/1164544118932906065) or opening an issue on the Refine GitHub page (https://github.com/refinedev/refine/issues). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@783439443410813008> kapa.ai is still learning and improving, please let us know how it did by reacting below
xenial-black
xenial-black4mo ago
It happens with the refine example "with-remix-antd", too. And it flashes with examples using the nextjs backend, so I'm really suspecting refine.
xenophobic-harlequin
xenophobic-harlequin4mo ago
Stack Overflow
How to use antd with remix?
Is there a proper way of using ant with remix? Using antd (ant.design) version 5. Tried adding the following to the root.tsx (as well as route files) file in remix project but styles still don't wo...
Usage with Next.js - Ant Design
An enterprise-class UI design language and React UI library with a set of high-quality React components, one of best React UI library for enterprises