Image for post
Image for post

Announcing styled-components v5: Beast Mode πŸ’ͺπŸ”₯

50% faster server-side rendering, 22% faster client-side rendering, 31% smaller bundle size, RTL support and no breaking changes! πŸ˜πŸ’―πŸŽ‰πŸ’…

Evan Jacobs
Jun 14, 2019 Β· 4 min read
npm install styled-components@^5.0.0

Fast, faster, styled-components πŸŽπŸ’¨

Image for post
Image for post
Mounting a deep component tree benchmark. Lower is better.

Clean, cleaner, React DevTools ✨

<TagLine>
<StyledComponent forwardedRef={null}>
<Context.Consumer>
<Context.Consumer>
<h2 className=”H2-sc-1izft7s-7”>Hello world</h2>
</Context.Consumer>
</Context.Consumer>
</StyledComponent>
</TagLine>
<TagLine>
<h2 className=”H2-sc-1izft7s-7”>Hello world</h2>
</TagLine>
Image for post
Image for post
React DevTools component tree output for styled-components.com. Left: styled-components v4, Right: styled-components v5

New, newer, StyleSheetManager 🧩

RTL support 🌏

import { StyleSheetManager } from 'styled-components';
import stylisRTLPlugin from 'stylis-plugin-rtl';
<StyleSheetManager stylisPlugins={[stylisRTLPlugin]}>
<App />
</StyleSheetManager>

Support us πŸ™

πŸ’… styled-components

Visual primitives for the component age.

Evan Jacobs

Written by

Poetry, tech, other pursuits. πŸ³οΈβ€πŸŒˆ

πŸ’… styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress πŸ’…

Evan Jacobs

Written by

Poetry, tech, other pursuits. πŸ³οΈβ€πŸŒˆ

πŸ’… styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress πŸ’…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer β€” welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store