tree-changes-hook
Advanced tools
Comparing version 0.8.0 to 0.9.0
import { useEffect, useRef } from 'react'; | ||
import * as equal from 'fast-deep-equal'; | ||
import equal from '@gilbarbara/deep-equal'; | ||
import treeChanges from 'tree-changes'; | ||
@@ -18,4 +18,5 @@ export default function useTreeChanges(value) { | ||
} | ||
// eslint-disable-next-line unicorn/prefer-export-from | ||
export { treeChanges }; | ||
export * from 'tree-changes'; | ||
//# sourceMappingURL=index.js.map |
@@ -15,3 +15,3 @@ "use strict"; | ||
var react_1 = require("react"); | ||
var equal = require("fast-deep-equal"); | ||
var deep_equal_1 = require("@gilbarbara/deep-equal"); | ||
var tree_changes_1 = require("tree-changes"); | ||
@@ -21,3 +21,3 @@ exports.treeChanges = tree_changes_1.default; | ||
var previousValue = (0, react_1.useRef)(value); | ||
var isEqual = equal(previousValue.current, value); | ||
var isEqual = (0, deep_equal_1.default)(previousValue.current, value); | ||
var previousIsEqual = (0, react_1.useRef)(isEqual); | ||
@@ -24,0 +24,0 @@ var instance = (0, react_1.useRef)((0, tree_changes_1.default)(previousValue.current, value)); |
{ | ||
"name": "tree-changes-hook", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "React hook for tree-changes", | ||
@@ -34,4 +34,4 @@ "author": "Gil Barbara <gilbarbara@gmail.com>", | ||
"dependencies": { | ||
"fast-deep-equal": "^3.1.3", | ||
"tree-changes": "^0.8.0" | ||
"@gilbarbara/deep-equal": "^0.1.0", | ||
"tree-changes": "^0.9.0" | ||
}, | ||
@@ -74,9 +74,10 @@ "devDependencies": { | ||
"path": "./lib/index.js", | ||
"limit": "3 kB" | ||
"limit": "4 kB" | ||
}, | ||
{ | ||
"path": "./esm/index.js", | ||
"limit": "3 kB" | ||
"limit": "4 kB" | ||
} | ||
] | ||
], | ||
"gitHead": "0d1c0dc2149ada45dd26163156414470bce211fb" | ||
} |
import { useEffect, useRef } from 'react'; | ||
import * as equal from 'fast-deep-equal'; | ||
import equal from '@gilbarbara/deep-equal'; | ||
import treeChanges, { Data, KeyType, TreeChanges } from 'tree-changes'; | ||
@@ -25,3 +25,4 @@ | ||
// eslint-disable-next-line unicorn/prefer-export-from | ||
export { treeChanges }; | ||
export * from 'tree-changes'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
9967
83
+ Added@gilbarbara/deep-equal@0.1.2(transitive)
+ Addedtree-changes@0.9.3(transitive)
- Removedfast-deep-equal@^3.1.3
- Removedfast-deep-equal@3.1.3(transitive)
- Removedtree-changes@0.8.0(transitive)
Updatedtree-changes@^0.9.0