styled-components v5.1.1 Release Notes

Release Date: 2020-04-07 // about 2 months ago
  • 🆕 New Functionality

    • 💅 Implement shouldForwardProp API for native and primitive platforms, which was previously missing in [v5.1.0] (see #3093)
      🚀 This has been released under a patch bump instead of a minor, since it's only been missing from Native-support.

    🛠 Bugfixes

    • ➕ Added useTheme hook to named exports for react-primitives entrypoint (see #2982) thanks @jladuval!
    • 💅 Escape every CSS ident character necessary when converting component display names to class names (see #3102) thanks @kripod!

Previous changes from v5.0.1

    ➕ Added useTheme hook to named exports for react native (#2982)

    🐎 Performance enhancements

    • Refactored hashing function that is a bit faster in benchmarks (#2983)

    - Fixed a bitwise math issue that was causing SSR performance degradations due to how we allocate typed arrays under the hood (#2996)

    ➕ Added some helpful new dev-time warnings for antipatterns

    • Recommending against usage of css @import inside createGlobalStyle and what to do instead (#2997)
    • Catching and warning against dynamic creation of styled-components inside other component render paths (#2998)