@react-spring/shared
Advanced tools
Comparing version 9.0.0-canary.809.1.aa2db98.0 to 9.0.0-canary.809.2.49361198
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import { useEffect } from 'react'; | ||
import { Indexable, FluidValue } from './types'; | ||
@@ -35,2 +35,8 @@ export declare const FluidType = "__$FluidType"; | ||
export declare function usePrev<T>(value: T): T | undefined; | ||
/** | ||
* React calls `console.warn` when using `useLayoutEffect` on the server. | ||
* To get around it, we can conditionally `useEffect` on the server (no-op) and | ||
* `useLayoutEffect` on the client. | ||
*/ | ||
export declare const useIsomorphicLayoutEffect: typeof useEffect; | ||
export {}; |
@@ -77,2 +77,12 @@ "use strict"; | ||
exports.usePrev = usePrev; | ||
/** | ||
* React calls `console.warn` when using `useLayoutEffect` on the server. | ||
* To get around it, we can conditionally `useEffect` on the server (no-op) and | ||
* `useLayoutEffect` on the client. | ||
*/ | ||
exports.useIsomorphicLayoutEffect = typeof window !== 'undefined' && | ||
typeof window.document !== 'undefined' && | ||
typeof window.document.createElement !== 'undefined' | ||
? react_1.useLayoutEffect | ||
: react_1.useEffect; | ||
//# sourceMappingURL=helpers.js.map |
{ | ||
"name": "@react-spring/shared", | ||
"version": "9.0.0-canary.809.1.aa2db98.0", | ||
"version": "9.0.0-canary.809.2.49361198", | ||
"description": "Globals and shared modules", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/react-spring/react-spring/tree/master/packages/shared#readme", |
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
97267
1121