You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I'm not sure where resetting the SheetsRegistry should occur. I just placed it after the ToString() call because that seemed the easiest place to put it.
Expected result
The pages should render consistently between the Javascript rendering and static rendering.
You are right. I think we would need to pass setHeadComponents to wrapRootElement so SheetsRegistry could live just inside that function scope. Otherwise we would need to create dictionary (<page_url, SheetsRegistry>) instead of single global registry.
)
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->
Not sure about the branch for this one. Just a small patch based off of cpboyd's solution for this issue: #7716closes#7716
…tsbyjs#9401)
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->
Not sure about the branch for this one. Just a small patch based off of cpboyd's solution for this issue: gatsbyjs#7716closesgatsbyjs#7716
Description
With certain combinations of styles, the SheetsRegistry should be cleared between rendered pages.
Steps to reproduce
This repo has a simplified reproduction and tracks my fix for it:
https://github.com/cpboyd/gatsby-layout-mui-bug
Note: I'm not sure where resetting the
SheetsRegistry
should occur. I just placed it after theToString()
call because that seemed the easiest place to put it.Expected result
The pages should render consistently between the Javascript rendering and static rendering.
Actual result
The styles were jumbled.
Environment
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.0 - /usr/local/bin/npm
Browsers:
Chrome: 68.0.3440.106
Safari: 11.1.2
npmPackages:
gatsby: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-image: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-plugin-google-analytics: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-plugin-jss: ^2.0.2-rc.0 => 2.0.2-rc.0
gatsby-plugin-layout: next => 1.0.0-rc.0
gatsby-plugin-manifest: ^2.0.2-rc.0 => 2.0.2-rc.0
gatsby-plugin-offline: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-plugin-react-helmet: ^3.0.0-rc.0 => 3.0.0-rc.0
gatsby-plugin-sharp: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-plugin-typescript: ^2.0.0-rc.0 => 2.0.0-rc.1
gatsby-plugin-typography: ^2.2.0-rc.0 => 2.2.0-rc.0
gatsby-remark-external-links: ^0.0.4 => 0.0.4
gatsby-remark-images: ^2.0.1-rc.0 => 2.0.1-rc.0
gatsby-remark-responsive-iframe: ^2.0.0-rc.0 => 2.0.0-rc.0
gatsby-source-filesystem: ^2.0.1-rc.0 => 2.0.1-rc.0
gatsby-transformer-json: ^2.1.1-rc.0 => 2.1.1-rc.0
gatsby-transformer-remark: ^2.1.1-rc.0 => 2.1.1-rc.0
gatsby-transformer-sharp: ^2.1.1-rc.0 => 2.1.1-rc.0
npmGlobalPackages:
gatsby-cli: 1.1.58
File contents (if changed)
gatsby-config.js
: N/Apackage.json
: N/Agatsby-node.js
: N/Agatsby-browser.js
: N/AThe original
gatsby-ssr.js
API started with a newSheetsRegistry
each time it rendered the page:Now the variable is file scoped and seems to persist across renderings:
The text was updated successfully, but these errors were encountered: