JSS v10.0.0 Release Notes

Release Date: 2019-09-22 // over 4 years ago
  • Summary

    ๐Ÿš€ A higher level overview of v10 release.

    • ๐Ÿš€ [react-jss] A new hooks-based API has been released and became the new default way to use JSS with React.
    • 0๏ธโƒฃ [jss] Keyframe IDs are now scoped by default.
    • ๐Ÿ’… [jss] Function values, function rules and observables apply plugins by default now, which means they can support all kinds of syntaxes: e.g. fallbacks, media queries, nesting, global styles.
    • ๐Ÿ‘ [jss] Houdini Typed CSSOM Values are supported now.
    • ๐Ÿ“ฆ [all] Each package supports ESM modules import, also possible directly from https://unpkg.com/.
    • [all] Added TypeScript type definitions to this repository.

    For more details please read the rest of the changelog and migration guide

    ๐Ÿ’ฅ Breaking Changes

    • 0๏ธโƒฃ [jss] SheetsRegistry.toString(options) will now return all sheets by default, no matter detached or attached. You can specify which one you want by using the option registry.toString({attached: true}) (1140)
    • [jss] Add option for opt-in minification of class names. (#1075)
    • ๐Ÿ“ฆ [jss] Observables, function values and rules are now standalone packages, not part of the core. They are still part of the default preset though.
    • โšก๏ธ [jss] Function values, rules and observables apply plugins by default now, which means they can support all plugin defined syntaxes, but they are also slower by default. To speed them up use sheet.update(data, {process: false}) for fn values/rules and jss.use(pluginObservable({process: false})) when setting up observables plugin. (#682)
    • 0๏ธโƒฃ [jss] Rule @Keyframes has now scoped name by default, which means that you can access it using $ref from the same sheet and generate global one as before using @global rule (#346).
    • ๐Ÿ‘ [jss] Add scoped keyframes support (#346)
    • ๐Ÿšš [react-jss] Move JssContext to new React Context, deprecate the sheetOptions prop on the JssProvider and support a media prop (#924)
    • ๐Ÿšš [react-jss] Remove inject option (#934)
    • [react-jss] Extend classes instead of overwriting theme (#946)
    • ๐Ÿ‘ [react-jss] Add forwardRef support (#943)
    • โฌ†๏ธ [react-jss] Upgrade to theming version 3 (#942)
    • [jss|react-jss] Options createGenerateClassName and generateClassName are renamed to createGenerateId and generateId because the same function is now used to scope @Keyframes rules.
    • ๐Ÿ‘ [react-jss] Drop support for older React versions, require v16.3 or higher (#868, #851)