Reproduction link
https://stackblitz.com/~/github.com/DmitryLebedevDev/antd-layout-shift-bug
Steps to reproduce
reload page many times
What is expected?
after loading -> view html skeleton -> expected page
What is actually happening?
after loading -> view html skeleton -> layout shift -> expected page
| Environment | Info |
| ------------ | ------------ |
| antd | 5.13.2 |
| React | ^18 |
| System | linux |
| Browser | chrome |
4条答案
按热度按时间z8dt9xmd1#
Seems cache will not catch any style during
useServerInsertedHTML
whenloading.tsx
is added.fhg3lkii2#
a temporary solution
render components with wrong view in loading.tsx
kulphzqa3#
I have the same problem too.
but, this issue only exists for me in dynamic routes.
k5hmc34c4#
I have the same issue when I fetch data on a function page.
export default async function Page() { const data = await getData(); return (<Input />) }