Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-storefront",
"version": "8.10.1",
"version": "8.10.2",
"description": "Build and deploy e-commerce progressive web apps (PWAs) in record time.",
"module": "./index.js",
"license": "Apache-2.0",
Expand Down
8 changes: 6 additions & 2 deletions src/LazyHydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function LazyStyles() {

function LazyStylesProvider({ id, children }) {
const generateClassName = createGenerateClassName({
productionPrefix: `lazy-${id}`,
seed: id,
})
const registry = new SheetsRegistry()
registry.id = id
Expand Down Expand Up @@ -211,7 +211,11 @@ function LazyHydrateInstance({ id, className, ssrOnly, children, on, ...props })
function LazyHydrate({ children, ...props }) {
return (
<LazyHydrateInstance {...props}>
<LazyStylesProvider {...props}>{children}</LazyStylesProvider>
{/* LazyStylesProvider should not be used in the browser. Once components
are hydrated, their styles will automatically be managed by the app's main
StyleProvider. Using LazyStylesProvider in the browser will result in duplicated
and conflicting styles in lazy components once they are hydrated. */}
{isBrowser() ? children : <LazyStylesProvider {...props}>{children}</LazyStylesProvider>}
</LazyHydrateInstance>
)
}
Expand Down