New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a prop to force Layout to know it has a Sider (with SSR) #8937

Closed
eduludi opened this Issue Jan 11, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@eduludi
Contributor

eduludi commented Jan 11, 2018

What problem does this feature solve?

This will prevent the layout from flickering when loading after server-side rendering (SSR).

Example:

<Layout>
  <Layout.Sider />
  <Layout>
    <Layout.Content />
  </Layout>
</Layout>

As it is, Layout.Content appears below Layout.Sider during an instant, and only after the JS load is done it sets in the right position.

What does the proposed API look like?

<Layout hasSider />
<Layout hasSider={true} />

or

<Layout withSider />
<Layout withSider={true} />
@yesmeck

This comment has been minimized.

Member

yesmeck commented Jan 12, 2018

afc163 added a commit that referenced this issue Jan 12, 2018

@afc163 afc163 closed this Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment