Buckets:
3.85 GB
70,867 files
Updated 17 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| dist | 12 items | ||
| package.json | 2.93 kB xet | f7e1f9b5 | |
| README.md | 625 Bytes xet | 924aae59 | |
| LICENSE | 1.07 kB xet | 382a7d98 |
use-isomorphic-layout-effect
A React helper hook for scheduling a layout effect with a fallback to a regular effect for environments where layout effects should not be used (such as server-side rendering).
Installation
$ npm i use-isomorphic-layout-effect
Usage
You only need to switch useLayoutEffect with useIsomorphicLayoutEffect
+ import useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';
- import { useLayoutEffect } from 'react';
const YourComponent = () => {
+ useIsomorphicLayoutEffect(() => {
- useLayoutEffect(() => {
// your implementation
}, []);
};
- Total size
- 3.85 GB
- Files
- 70,867
- Last updated
- Nov 3
- Pre-warmed CDN
- US EU US EU