Skip to content
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

[react-jss] Hooks #1089

Merged
merged 61 commits into from
Jun 7, 2019
Merged

[react-jss] Hooks #1089

merged 61 commits into from
Jun 7, 2019

Conversation

HenriBeck
Copy link
Member

What would you like to add/fix?
Hooks support 🎉 🎉

Corresponding issue (if exists): #907

@HenriBeck HenriBeck requested a review from kof April 13, 2019 11:55
Henri Beck added 8 commits April 14, 2019 11:35
* master: (24 commits)
  Fix #1084 (#1085)
  Update size snapshots
  [jss-plugin-expand]Added the ability to expand the attributes for border-bottom (#1083)
  Update react-jss.md (#1078)
  Fix typspec for default unit plugin (#1077)
  Delete CNAME
  Create CNAME
  v10.0.0-alpha.16
  fix versions manually
  update changelog, make build
  Add local yarn version (#1071)
  update snapshots
  Update size-snapshots
  v10.0.0-alpha.15
  update changelog, make build
  Update to [email protected] (#1068)
  Improve IE 11 support (#1065)
  fix changelog
  v10.0.0-alpha.14
  [jss] Add support for multiple referenced keyframes (#1063)
  ...

# Conflicts:
#	packages/jss-plugin-default-unit/.size-snapshot.json
#	packages/jss-preset-default/.size-snapshot.json
#	packages/jss-starter-kit/.size-snapshot.json
#	packages/jss/.size-snapshot.json
#	packages/react-jss/.size-snapshot.json
#	packages/react-jss/src/types.js
#	packages/react-jss/src/withStyles.js
@kof
Copy link
Member

kof commented Apr 14, 2019

CC @oliviertassinari @eps1lon wanna review this one as well? Are there use cases that mui hooks interface support and this implementation isn't? I would love to align them

@damianobarbati
Copy link

Is this making it into next alpha release so we can start playing with it? :)

@kof
Copy link
Member

kof commented Jun 5, 2019

yes

@kof kof merged commit b946dde into master Jun 7, 2019
@kof
Copy link
Member

kof commented Jun 7, 2019

@HenriBeck I merged it and I am going to release 10.0.0-alpha.17 ... to let everyone try this version ... we still have some new bugs in the issues and dynamic updates benchmark from react-native-web doesn't work.

Also we need to try to reduce the amount hooks we use, because I think they cost us CPU time and we . are loosing perf benefits against HOC interface.

@kof
Copy link
Member

kof commented Jun 7, 2019

releasing it despite failing tests, I think it is again something with browserstack, if not we have to fix it in the next release

@kof
Copy link
Member

kof commented Jun 7, 2019

v10.0.0-alpha.17 is out

bhupinderbola pushed a commit to bhupinderbola/jss that referenced this pull request Sep 17, 2019
* Revert "Revert "Add dynamic rules to static sheet""

This reverts commit 1e35967

* Fix adding dynamic rules to sheet

* Fix a few tests

* Fix tests

* Format code

* Add comments

* Update changelog

* Update size-snapshot

* Initial draft

* Add missing dependency

* Fix some type issues

* Rename hook folder to create-use-styles and hoc to with-styles

* Unify some files

* Fix imports

* Fix some flow issues

* Update size snapshots

* Fix some eslint problems

* Update packages/react-jss/src/create-use-styles.js

Co-Authored-By: HenriBeck <[email protected]>

* Update file names and default exports

* Use type instead of interface

* Fix linting

* Fixed PR comments

* Update size snapshots

* fix linter, make all file names camel cased

* Use state instead of relying on memo

* Use is-in-browser package

* Fix some type issues and add support for recreating the sheet when the theme changes

* upgrade theming

* add sheet to the registry when managing sheets, pass a theme when using one

* Fixed all tests

* Fix linting etc.

* Use MIN_SAFE_INTEGER

* remove the need for extra eslit rules

* Add tests for hooks and fix some issue

* Remove check for disableStylesGeneration

* more explicit name for the hook

* port class name prefix test

* reuse tests between hooks and hocs

* make dynamicStyles tests use hooks

* generate dynamic styles test using HOC

* migrate all dynamic styles tests to use createStyledComponent

* refactor theming tests

* Rewrite to useReducer

* Fix JssProvider

* port theming tests for hooks

* move reducer to the module scope, since it doesn't need to be recreated

* reset module Id

* rename shallow-equal, add a note

* hooks docs

* better description

* better wording

* fix link
@iamstarkov iamstarkov deleted the react-jss/feature/hooks branch October 4, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants