-
-
Notifications
You must be signed in to change notification settings - Fork 389
Update Changelog (v10.6.0) #1466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,37 @@ Since you are interested in what happens next, in case, you work for a for-profi | |
|
|
||
| --- | ||
|
|
||
| ### Bug fixes | ||
| ## 10.6.0 (2021-03-11) | ||
|
|
||
| ### Improvements | ||
|
|
||
| - [jss] `Styles` now supports `ClassNames`, `Props`/`Data`, and `Theme` as type parameters (eg. `Styles<Names, Data, Theme>`). [1460](https://github.com/cssinjs/jss/pull/1460) | ||
| - [react-jss] `withStyles` and `createUseStyles` now support `ClassNames`, `Props`, and `Theme` as type parameters (eg. `createUseStyles<Names, Props, Theme>`). [1460](https://github.com/cssinjs/jss/pull/1460) | ||
| - [react-jss] `useStyles` finally expects the correct argument type: a `Props` object with an optional `Theme` property (both determined from `createUseStyles`). [1460](https://github.com/cssinjs/jss/pull/1460) | ||
|
|
||
| ### Breaking Changes | ||
|
|
||
| - [react-jss] `Theme` is no longer the first generic type parameter for `createUseStyles`. [1460](https://github.com/cssinjs/jss/pull/1460) | ||
| - There are two main ways to tell TypeScript your `Theme`'s type without reaching over the other type parameters: | ||
|
|
||
| Using the function argument. (Recommended) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't encourage using this interface until we decide what to do with it, we had a discussion to remove it for various reasons
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I wasn't aware. I'll remove the "Recommended" piece then. Should the functional example be removed as well or should it stay? |
||
|
|
||
| ```typescript | ||
| const useStyles = createUseStyles(theme: Theme => ({ | ||
| className: { /* ... */ }; | ||
| })) | ||
| ``` | ||
|
|
||
| Using the object argument with a function. (You will only need to specify the `Theme` type once.) | ||
|
|
||
| ```typescript | ||
| const useStyles = createUseStyles({ | ||
| className: ({theme}: {theme: Theme}) => ({ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. className is misleading, because it would mean it's actual classname, where actual class name is generated, this is what we call a rule name
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fair. I'll rename it to |
||
| /* ... */ | ||
| }) | ||
| }) | ||
| ``` | ||
|
|
||
| ## 10.5.1 (2021-1-23) | ||
|
|
||
| ### Bug fixes | ||
|
|
@@ -34,7 +61,7 @@ Since you are interested in what happens next, in case, you work for a for-profi | |
| - [*] Remove test files from the package [1406](https://github.com/cssinjs/jss/pull/1406) | ||
| - [*] Upgrade rollup [1426](https://github.com/cssinjs/jss/pull/1426) | ||
| - [*] Upgrade flow to 0.138.0 [1425](https://github.com/cssinjs/jss/pull/1425) | ||
| - [jss-plugin-default-unit] aAdd gap unit [1403](https://github.com/cssinjs/jss/pull/1403) | ||
| - [jss-plugin-default-unit] Add gap unit [1403](https://github.com/cssinjs/jss/pull/1403) | ||
| - [jss-plugin-default-unit] Add default units to logical properties [1415](https://github.com/cssinjs/jss/pull/1415) | ||
| - [jss] Improve deleteRule() performance [1424](https://github.com/cssinjs/jss/pull/1424) | ||
|
|
||
|
|
@@ -436,3 +463,7 @@ Republish of alpha 5 with properly building the code. | |
| - [jss-plugin-vendor-prefixer](https://github.com/cssinjs/jss-vendor-prefixer/blob/master/changelog.md) | ||
| - [jss-preset-default](https://github.com/cssinjs/jss-preset-default/blob/master/changelog.md) | ||
| - [react-jss](./docs/react-jss.md/blob/master/changelog.md) | ||
|
|
||
| ``` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that one's confusing to me. 🤔 It definitely wasn't intentional. Glad you noticed it though. |
||
|
|
||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version is generated upon release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I'll remove it then.