Download next.js/packages/next/src/shared/lib/hooks-client-context.shared-runtime.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/hooks-client-context.shared-runtime.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/shared/lib/hooks-client-context.shared-runtime.ts
-
curl -L -o hooks-client-context.shared-runtime.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/hooks-client-context.shared-runtime.ts
534 Bytes
| 'use client' | |
| import { createContext } from 'react' | |
| import type { Params } from '../../server/request/params' | |
| export const SearchParamsContext = createContext<URLSearchParams | null>(null) | |
| export const PathnameContext = createContext<string | null>(null) | |
| export const PathParamsContext = createContext<Params | null>(null) | |
| if (process.env.NODE_ENV !== 'production') { | |
| SearchParamsContext.displayName = 'SearchParamsContext' | |
| PathnameContext.displayName = 'PathnameContext' | |
| PathParamsContext.displayName = 'PathParamsContext' | |
| } | |