styled-components v4 has recently been released. Details about new awesome features and performance boosts can be found in the blog post, the changelog and the migration guide.
There is now a new way to use global styles via the createGlobalStyle factory API function that returns a React.Component instead of injecting it directly like in v3 with injectGlobalStyle.
To support v4, instructions will be added to the documentation how to use it with this project. We won't change the currently exported interpolated styles to export a React component since this won't allows users to compose or override the styles and would force them to use the component as it is. It would also break the usage with v3 or lower. Users who like to use the new component-based approach can simply create a new styeled component with the new createGlobalStyle API and inject the styles imported from this library, allowing them to adjust and modify it to fit their needs.
styled-components v4 has recently been released. Details about new awesome features and performance boosts can be found in the blog post, the changelog and the migration guide. There is now a new way to use global styles via the
createGlobalStyle
factory API function that returns aReact.Component
instead of injecting it directly like in v3 withinjectGlobalStyle
.To support v4, instructions will be added to the documentation how to use it with this project. We won't change the currently exported interpolated styles to export a React component since this won't allows users to compose or override the styles and would force them to use the component as it is. It would also break the usage with v3 or lower. Users who like to use the new component-based approach can simply create a new styeled component with the new
createGlobalStyle
API and inject the styles imported from this library, allowing them to adjust and modify it to fit their needs.