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

Use memoize-one package #1358

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions packages/react-jss/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"dist/react-jss.js": {
"bundled": 169946,
"minified": 58911,
"gzipped": 19311
"bundled": 170289,
"minified": 58963,
"gzipped": 19318
},
"dist/react-jss.min.js": {
"bundled": 112923,
"minified": 42170,
"gzipped": 14335
"bundled": 113266,
"minified": 42222,
"gzipped": 14341
},
"dist/react-jss.cjs.js": {
"bundled": 26398,
"minified": 11532,
"gzipped": 3759
"bundled": 25839,
"minified": 11321,
"gzipped": 3672
},
"dist/react-jss.esm.js": {
"bundled": 24901,
"minified": 10301,
"gzipped": 3602,
"bundled": 24322,
"minified": 10075,
"gzipped": 3515,
"treeshaked": {
"rollup": {
"code": 1838,
"import_statements": 538
"code": 1858,
"import_statements": 558
},
"webpack": {
"code": 3436
"code": 3490
}
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/react-jss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"is-in-browser": "^1.1.3",
"jss": "^10.3.0",
"jss-preset-default": "^10.3.0",
"memoize-one": "^5.1.1",
"prop-types": "^15.6.0",
"shallow-equal": "^1.2.0",
"theming": "3.2.0",
Expand Down
34 changes: 0 additions & 34 deletions packages/react-jss/src/utils/memoizeOne.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/react-jss/src/withStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import hoistNonReactStatics from 'hoist-non-react-statics'
import {type StyleSheet, type Classes} from 'jss'
import {ThemeContext} from 'theming'

import memoize from 'memoize-one'
import type {HOCProps, HOCOptions, Styles, InnerProps, DynamicRules} from './types'
import getDisplayName from './getDisplayName'
import memoize from './utils/memoizeOne'
import mergeClasses from './utils/mergeClasses'
import JssContext from './JssContext'
import getSheetIndex from './utils/getSheetIndex'
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6323,6 +6323,11 @@ mem@^4.0.0:
mimic-fn "^1.0.0"
p-is-promise "^1.1.0"

memoize-one@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0"
integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==

memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
Expand Down