@openfin/ui-library 0.1.12 → 0.1.13-alpha.1621206567

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export declare function usePrevious<T>(value: T): T | undefined;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePrevious = void 0;
4
+ const react_1 = require("react");
5
+ function usePrevious(value) {
6
+ const ref = react_1.useRef();
7
+ react_1.useEffect(() => {
8
+ ref.current = value;
9
+ }, [value]);
10
+ return ref.current;
11
+ }
12
+ exports.usePrevious = usePrevious;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfin/ui-library",
3
3
  "description": "OpenFin UI Component Library",
4
- "version": "0.1.12",
4
+ "version": "0.1.13-alpha.1621206567",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",