-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Weird component reordering issue #15884
Comments
Sounds like it could be a ssr mismatch issue, or css/markup issue? Does this happen during |
I don't have a
No, just in the production build.
I've posted a link to the compiled site in step (3) above. Or do you mean the source? |
@mavam Yes a link to the source code would be extremely helpful with trying to debug this. If you can't share the code, could you make a simple reproduction so we can try pinpointing what the issue is |
Unfortunately I lack the bandwidth to trim down our current site into a minimal example. Maybe I can provide some more context and we can narrow down the faulty component: here are two screenshots of our footer component, which erroneously gets rendered twice: Does that help? Could I provide anything else along the lines that could yield more insights? |
I was able to find the potential culprit. My const Layout = (props) => (
<StaticQuery
query={graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
}
}
}
`}
render={data => (
<>
<Helmet title={data.site.siteMetadata.title} />
{props.children}
<Footer />
</>
)}
/>
) After wrapping the children props and <>
<Helmet title={data.site.siteMetadata.title} />
<main>
{props.children}
</main>
<footer>
<Footer />
</footer>
</> This workaround is good 'nuf for me, so I'm closing the issue. (It could be just a bandaid over a wart that's showing up again down the line. But I'm not a frontend guy - just churning away until we find an experienced Gatsby/React person to work for us...) |
Description
I'm experiencing a weird "component reordering" bug where the footer appears above the main content. Other than Gatsby, I'm using Semantic UI. I don't have anything UI-specific in the
gatsby-*.js
files;gatsby-browser.js
just has an import for a CSS font,gatsby-node.js
includes logic to create blog pages, andgatsby-config.js
the usual plugin configurations.Steps to reproduce
gatsby build
tenzir.surge.sh
Expected result
Actual result
Environment
The text was updated successfully, but these errors were encountered: