yarn add styled-components@beta
Changed in this version
- breaking refactor(stylis): disable vendor prefixing by default by @probablyup in 2b4f6cb
- Fix determineTheme & add typing by @benbryant0 in #3966
- Optimization of hot paths by @benbryant0 in #3970
- refactor: adjust className application order by @probablyup in 1e3ffeb
- misc code optimizations
Breaking changes in v6
- now using
stylis
v4 (if usingstylis-plugin-rtl
you'll need to upgrade to the newer version) - styled-components now provides its own types; if you installed
@types/styled-components
in the past, you'll want to remove it - dropped
$as
and$forwardedAs
props (useas
orforwardedAs
) - dropped automatic prop filtering; use transient props (
$
prefix) for stuff you don't want to be passed to child component / HTML StyleSheetManager
- replaced
disableVendorPrefixes
withenableVendorPrefixes
prop - dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
<StyleSheetManager enableVendorPrefixes> {/* your React tree and ThemeProvider goes here */} </StyleSheetManager>
- replaced
- dropped deprecated
withComponent
API (87f511a); use "as" prop instead - node >= 14 needed
New Contributors (thank you!)
- @benbryant0 made their first contribution in #3966
Full Changelog: v6.0.0-beta.13...v6.0.0-beta.14