Skip to content
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

Use ComponentRenderer for both page/layout components #1773

Merged
merged 9 commits into from
Aug 11, 2017
Merged

Conversation

KyleAMathews
Copy link
Contributor

Realized that we never need to render layouts except on page transitions so
the logic for the page & layout rendering are identical so we might as well
use the same component.

This also solves problems where there's a layout change associated with a page change
but the layout renders before the page resources have loaded which causes temporary
broken looking code.

Also should fix #1756

/cc @craig-mulligan & @jbolda

@KyleAMathews
Copy link
Contributor Author

KyleAMathews commented Aug 11, 2017

Deploy preview failed.

Built with commit c05f6fa

https://app.netlify.com/sites/using-glamor/deploys/598df6f36f4c5033411014d0

@gatsbybot
Copy link
Collaborator

gatsbybot commented Aug 11, 2017

Deploy preview ready!

Built with commit 45e0e5b

https://deploy-preview-1773--using-drupal.netlify.com

This happens because dev-only pages (e.g. dev-404-page) can create
page data dependencies which in a production build, Gatsby attempts to
handle.
@gatsbybot
Copy link
Collaborator

gatsbybot commented Aug 11, 2017

Deploy preview ready!

Built with commit 45e0e5b

https://deploy-preview-1773--gatsbygram.netlify.com

@KyleAMathews KyleAMathews merged commit 709e39e into master Aug 11, 2017
@KyleAMathews KyleAMathews deleted the fix-layouts branch August 11, 2017 19:58
@craigmulligan
Copy link

Nice work @KyleAMathews 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout-render.js doesn't pick up state changes
3 participants