arcticicestudio / styled-modern-normalize

modern-normalize.css for styled-components
http://npm.im/styled-modern-normalize
MIT License
18 stars 1 forks source link

Support for styled-components v4 #6

Closed arcticicestudio closed 5 years ago

arcticicestudio commented 5 years ago

Related to #4 Implemented by @azdanov in PR #5

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.