inference bureau
← Changelog
FixedApps

Shopify admin pages no longer fail to hydrate in Preview

A Shopify app's admin page showed two errors in the console's Preview: "Hydration failed" and "Encountered a script tag while rendering React component". Preview added its own script at the top of the page's head, where React expected the layout's App Bridge script. It now goes at the end of the body, and the errors are gone for every app. New Polaris apps also start with suppressHydrationWarning on <html>, since Polaris sets a class there as it loads.

An existing Polaris app still logs a warning about the class on <html> until its layout has the same attribute: change <html lang="en"> to <html lang="en" suppressHydrationWarning> in web/app/layout.tsx, or ask the assistant to.