Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.ts from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 637 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/%40emotion/use-insertion-effect-with-fallbacks/src/index.ts
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/%40emotion/use-insertion-effect-with-fallbacks/src/index.ts
637 Bytes
| 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 | |