styled-jsx

Full CSS support for JSX without compromises

MIT License

Downloads
26.7M
Stars
7.6K
Committers
77

Bot releases are visible (Hide)

styled-jsx - v5.1.3 Latest Release

Published by github-actions[bot] 5 months ago

5.1.3 (2024-05-07)

Bug Fixes

styled-jsx - v5.1.2

Published by github-actions[bot] over 1 year ago

5.1.2 (2023-01-25)

Bug Fixes

styled-jsx - v5.1.1

Published by github-actions[bot] almost 2 years ago

5.1.1 (2022-12-15)

Bug Fixes

styled-jsx - v5.1.0

Published by github-actions[bot] about 2 years ago

5.1.0 (2022-10-17)

Features

styled-jsx - v5.0.7

Published by github-actions[bot] about 2 years ago

5.0.7 (2022-09-09)

Bug Fixes

styled-jsx - v5.0.6

Published by github-actions[bot] about 2 years ago

5.0.6 (2022-09-05)

Bug Fixes

styled-jsx - v5.0.5

Published by github-actions[bot] about 2 years ago

5.0.5 (2022-09-02)

Improvements

Misc

  • Replace bundler #802
styled-jsx - v5.0.4

Published by github-actions[bot] about 2 years ago

5.0.4 (2022-08-11)

Bug Fixes

styled-jsx - v5.0.3

Published by github-actions[bot] about 2 years ago

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
styled-jsx - v5.0.2

Published by github-actions[bot] over 2 years ago

5.0.2 (2022-03-28)

Performance Improvements

  • including macro.d.ts to decalaration files (#791) (cac4b8c)
styled-jsx - v5.0.1

Published by github-actions[bot] over 2 years ago

5.0.1 (2022-03-13)

Bug Fixes

  • peer dep declaration for react 18 with npm (#788) (384d208)
styled-jsx - v5.0.0

Published by github-actions[bot] over 2 years ago

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.

styled-jsx - v5.0.0-beta.7

Published by github-actions[bot] almost 3 years ago

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

Performance Improvements

  • Pre-compile dependencies to reduce install size/time (#770) (b214c51)
styled-jsx - v5.0.0-beta.6

Published by github-actions[bot] almost 3 years ago

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

Performance Improvements

  • fallback to module level registry in browser (#768) (3366cfd)
styled-jsx - v5.0.0-beta.5

Published by github-actions[bot] almost 3 years ago

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

Bug Fixes

styled-jsx - v5.0.0-beta.4

Published by github-actions[bot] almost 3 years ago

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

Bug Fixes

styled-jsx - v5.0.0-beta.3

Published by github-actions[bot] almost 3 years ago

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

Features

  • opt in insertion effect hook when available (#753) (e0e253c)
styled-jsx - v5.0.0-beta.2

Published by github-actions[bot] about 3 years ago

5.0.0-beta.2 (2021-09-15)

Bug Fixes

  • Make JSXStyle return a noop if the registry context is not provided (#749) (e5c3842)
styled-jsx - v5.0.0-beta.1

Published by github-actions[bot] about 3 years ago

5.0.0-beta.1 (2021-09-08)

Docs Change

BREAKING CHANGES & Features

styled-jsx - v4.0.1

Published by github-actions[bot] about 3 years ago

4.0.1 (2021-08-30)

Bug Fixes

  • mark @babel/core as optional peer dependency (#739) (69a76f2)