Skip to content

Releases: vercel/styled-jsx

v5.0.4

11 Aug 14:19
865ba14
Compare
Choose a tag to compare

5.0.4 (2022-08-11)

Bug Fixes

v5.0.3

09 Aug 01:29
22e36bf
Compare
Choose a tag to compare

5.0.3 (2022-08-09)

Patches

  • declare module and fix conflict typing name #805
  • improvement: add typing for style imports #804

Documentation

  • docs: update typescript guide with babel plugin #801
  • chore: remove git.io #794

v5.0.2

28 Mar 17:24
cac4b8c
Compare
Choose a tag to compare

5.0.2 (2022-03-28)

Performance Improvements

  • including macro.d.ts to decalaration files (#791) (cac4b8c)

v5.0.1

13 Mar 19:53
384d208
Compare
Choose a tag to compare

5.0.1 (2022-03-13)

Bug Fixes

  • peer dep declaration for react 18 with npm (#788) (384d208)

v5.0.0

20 Jan 21:10
Compare
Choose a tag to compare

5.0.0 (2022-01-20)

Features

  • Introduce contextual styles (#744)
  • Opt-in react 18 insertion effect hook when available (#753)
  • Fallback to module level registry in browser (#768)

Improvements

  • Make JSXStyle return a noop if the registry context is not provided (#749)
  • Fix typings of nonce property
  • Pre-compile dependencies to reduce install size/time (#770)

BREAKING CHANGES

APIs

  • styled-jsx/server import path is deprecated
  • flush and flushToHTML from styled-jsx/server APIs are deprecated
  • New component <StyledRegistry> is introduced
  • New APIs useStyleRegistry and createStyleRegistry are introduced

Usage

If you're only use styled-jsx in pure client side, nothing will effect you.
If you're using styled-jsx inside Next.js without customization, Next.js will manage the new gaps and it's same as previous.

If you have your own customization with styled-jsx in Next.js, for example you have a custom _document:
By default, doing this will let Next.js collect styles and pass them down.

class Document extends React.Component {
  static async getInitialProps(ctx) {
    return await ctx.defaultGetInitialProps(ctx)
  }
}

Or for instance you're passing nonce property in getInitialProps of _document, this will let you configure it:

class Document extends React.Component {
  static async getInitialProps(ctx) {
-    return await ctx.defaultGetInitialProps(ctx)
+    return await ctx.defaultGetInitialProps(ctx, { nonce })
  }
}

If you're building the SSR solution yourself with other frameworks, please checkout the Server-Side Rendering section in readme.

v5.0.0-beta.7

14 Jan 14:14
b214c51
Compare
Choose a tag to compare
v5.0.0-beta.7 Pre-release
Pre-release

5.0.0-beta.7 (2022-01-14)

Performance Improvements

  • Pre-compile dependencies to reduce install size/time (#770) (b214c51)

v5.0.0-beta.6

22 Dec 12:59
3366cfd
Compare
Choose a tag to compare
v5.0.0-beta.6 Pre-release
Pre-release

5.0.0-beta.6 (2021-12-22)

Performance Improvements

  • fallback to module level registry in browser (#768) (3366cfd)

v5.0.0-beta.5

17 Dec 21:49
2cfffd0
Compare
Choose a tag to compare
v5.0.0-beta.5 Pre-release
Pre-release

5.0.0-beta.5 (2021-12-17)

Bug Fixes

v5.0.0-beta.4

10 Nov 11:19
536ba94
Compare
Choose a tag to compare
v5.0.0-beta.4 Pre-release
Pre-release

5.0.0-beta.4 (2021-11-10)

Bug Fixes

v5.0.0-beta.3

22 Oct 12:45
e0e253c
Compare
Choose a tag to compare
v5.0.0-beta.3 Pre-release
Pre-release

5.0.0-beta.3 (2021-10-22)

Features

  • opt in insertion effect hook when available (#753) (e0e253c)