styled-components
6.6.0 · 12 Oct 2026MIT14.8M / weekRepositoryHomepagenpmAtom feed
Upgrading styled-components From 4.0.0 to 4.4.1
14 releases in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 12
- new
- 12
- fixes
Before you upgrade
Tick each one off as you go- Deprecated4.1.0
Release by release
- Fixed
Fix
styled-components'sreact-nativeimport for React Native Web,
- Fixed
- Fixed
Fix to use
ownerDocumentinstead of globaldocument, - Fixed
Fix attrs not properly taking precedence over props
- Fixed
Fix add check for style tag detached - sheet in the style tag is null in this case,
- Fixed
4.3.1 – 4.3.22 releases, nothing new or fixed in the notes
- New
Add "forwardedAs" prop to allow deeply passing a different "as" prop value to underlying components when using
styled()as a higher-order component (see #2580) - New
Implement defaultProps folding (see #2597)
- Fixed
Fix components being folded inappropriately when an interim HOC is present (see #2586)
- Fixed
Fix
themeprop for styled native components, also fixesthemeindefaultPropsfor them (see #2576)
- New
- New
Add svg tag
markerto domElements.js (see #2389) - New
Expose
StyleSheetContextandStyleSheetConsumerfor you fancy babes doing wild stuff - Fixed
Fix an edge case where React would break streaming inside
<textarea>elements, which have special child behavior and aren't a suitable place to inject a style tag (see #2413)
- New
4.1.3nothing new or fixed in the note
- New
Expose the
ThemeConsumerandThemeContextexports for the native and primitives entries (see #2217) - Fixed
Fix function-form attrs to receive the full execution context (including theme) (see #2210)
- Fixed
Don't treat uppercased strings as tag-like components and don't filter out props from them (see #2225)
- New
22 other lines we could not sort, mostly version bumps
- 4.4.1
Remove dev-time warning if referencing a theme prop without an outer
ThemeProvider, the check for it isn't smart enough to handle cases with "or" or ternary fallbacks and creates undesirable noise in various third party integrations - 4.4.0
Backport fix for SSR classname mismatches in development mode for some environments like next.js (see #2701)
- 4.4.0
Backport fix where classnames are composed in the wrong order if custom class names are passed in (see #2760)
- 4.3.1
Revert #2586; breaks rehydration in dev for certain runtimes like next.js
- 4.3.0
Make it possible to initialize
SC_ATTRandSC_DISABLE_SPEEDYviaREACT_APP_*.env variables for easier integration with CRA applications (see #2501) - 4.2.1
Remove className usage checker dev utility due to excessive false-positive noise in certain runtime environments like next.js and the related warning suppression prop (see #2563).
- 4.2.1
Attach displayName to forwardRef function as described in React docs (see #2508).
- 4.2.1
Compatibility with react-native-web 0.11 (see #2453).
- 4.2.1
Remove validation in Babel macro,
- 4.2.0
Reduced GC pressure when using component selector styles. (see #2424).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.