Buckets:
Quantumbraid/trainingdata / ui /node_modules /@emotion /use-insertion-effect-with-fallbacks /src /index.ts
| import * as React from 'react' | |
| import isBrowser from '#is-browser' | |
| const syncFallback = <T>(create: () => T) => create() | |
| const useInsertionEffect = React[ | |
| ('useInsertion' + 'Effect') as 'useInsertionEffect' | |
| ] | |
| ? (React[('useInsertion' + 'Effect') as 'useInsertionEffect'] as <T>( | |
| create: () => T | |
| ) => T | undefined) | |
| : false | |
| export const useInsertionEffectAlwaysWithSyncFallback: <T>( | |
| create: () => T | |
| ) => T | undefined = !isBrowser | |
| ? syncFallback | |
| : useInsertionEffect || syncFallback | |
| export const useInsertionEffectWithLayoutFallback: typeof React.useLayoutEffect = | |
| useInsertionEffect || React.useLayoutEffect | |
Xet Storage Details
- Size:
- 637 Bytes
- Xet hash:
- 48faa58029207bca88d3aa163ed9f04f5b623b0523938d4a526a3e093e90b003
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.