use-memo-one
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "use-memo-one", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "useMemo and useCallback but with a stable cache", | ||
@@ -30,32 +30,32 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"@babel/core": "^7.5.0", | ||
"@babel/preset-env": "^7.5.2", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/preset-react": "^7.0.0", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^10.0.1", | ||
"babel-jest": "^24.7.1", | ||
"enzyme": "^3.9.0", | ||
"enzyme-adapter-react-16": "^1.12.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-flowtype": "^3.5.1", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jest": "^22.4.1", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"eslint-plugin-react": "^7.12.4", | ||
"eslint-plugin-react-hooks": "^1.6.0", | ||
"flow-bin": "^0.96.0", | ||
"jest": "^24.7.1", | ||
"jest-watch-typeahead": "^0.3.0", | ||
"prettier": "^1.16.4", | ||
"babel-eslint": "^10.0.2", | ||
"babel-jest": "^24.8.0", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"eslint": "^6.0.1", | ||
"eslint-config-airbnb": "^17.1.1", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-flowtype": "^3.11.1", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jest": "^22.7.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.2", | ||
"eslint-plugin-react-hooks": "^1.6.1", | ||
"flow-bin": "^0.102.0", | ||
"jest": "^24.8.0", | ||
"jest-watch-typeahead": "^0.3.1", | ||
"prettier": "^1.18.2", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.9.0", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"rollup-plugin-replace": "^2.1.1", | ||
"rollup": "^1.16.7", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-commonjs": "^10.0.1", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-uglify": "^6.0.2" | ||
@@ -62,0 +62,0 @@ }, |
@@ -37,4 +37,4 @@ # useMemoOne | ||
const { name, age } = props; | ||
const value = useMemoOne(() => ({hello: name}), [name]); | ||
const getAge = useCallbackOne(() => age, [age]) | ||
const value = useMemoOne(() => ({ hello: name }), [name]); | ||
const getAge = useCallbackOne(() => age, [age]); | ||
@@ -55,3 +55,3 @@ // ... | ||
⚠️ The aliased exports `useMemo` and `useCallback` will only work if you use *only* `use-memo-one` and will clash if you also use `useMemo` or `useCallback` from `react` | ||
⚠️ The aliased exports `useMemo` and `useCallback` will only work if you use _only_ `use-memo-one` and will clash if you also use `useMemo` or `useCallback` from `react` | ||
@@ -75,3 +75,6 @@ ```js | ||
// Or your can alias it yourself | ||
import { useMemoOne as useMemo, useCallbackOne as useCallback} from 'use-memo-one'; | ||
import { | ||
useMemoOne as useMemo, | ||
useCallbackOne as useCallback, | ||
} from 'use-memo-one'; | ||
@@ -84,4 +87,4 @@ function App() { | ||
// the input array will now be correctly checked by eslint-plugin-react-hooks | ||
}, [isActive]) | ||
// the input array will now be correctly checked by eslint-plugin-react-hooks | ||
}, [isActive]); | ||
} | ||
@@ -96,7 +99,8 @@ ``` | ||
module.exports = { | ||
'rules': { | ||
// ...other rules | ||
rules: { | ||
// ...other rules | ||
'no-restricted-imports': [ | ||
'error', { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
// If you want to force an application to always use useMemoOne | ||
@@ -120,4 +124,4 @@ paths: [ | ||
], | ||
} | ||
}, | ||
}; | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15261
122