Ask Your Question
1

When using Next.js 13 and Ant Design 5, components and pages are rendering before styles load, resulting in a jumping effect.

asked 2022-07-20 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-07-12 06:00:00 +0000

plato gravatar image

This issue can be resolved by using CSS-in-JS libraries like styled-components or emotion, which allow the styles to be loaded synchronously with the component. This way, the component will only be rendered after the style has been loaded, eliminating the jumping effect. Additionally, you can also consider adding a preloader to your application to give the user a visual indication that the content is still loading.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-20 11:00:00 +0000

Seen: 14 times

Last updated: Jul 12 '22