Patch Changes
-
Server rendering on the edge runtime is not supported. On a route with
export const runtime = 'edge', a server component using styled-components failsnext build, and a client component rendered through aServerStyleSheetregistry fails on the request, each with an error naming the fix: remove that line, or set it to'nodejs', on every route that renders styled-components on the server. (edge-runtime-error.md) -
The published package no longer ships a stray copy of the React Native development dependencies under
native/node_modules, which made the install roughly 60 MB larger than the library itself. It also dropstest-utils/, the repository's own test helpers, which import modules the package does not include and so could not be loaded from an install. (native-node-modules-pack.md) -
Fixed styles from server components and
createGlobalStyledisappearing when React reveals content from behind a<Suspense>boundary, or when a navigation swaps one sibling route for another. A component first rendered inside a loading fallback, or a global style mounted by both a layout and its page, could end up with a class name but no matching rule, or with no global styles at all. (rsc-suspense-style-removal.md)Every server-rendered styled component and global style carries the rules it needs, so no instance depends on another surviving. The data React sends to the browser includes each distinct style once.
Full Changelog: styled-components@7.0.0-prerelease-20260925191055...styled-components@7.0.0-prerelease-20261012164616