Spaces:
Running
Running
Download src/context/useApp.ts from Samfredoly/jor: direct link, hf CLI and curl.
- Browser
- Download file 236 Bytes
-
https://huggingface.co/spaces/Samfredoly/jor/resolve/main/src/context/useApp.ts
- Command line
-
hf download hf://spaces/Samfredoly/jor/src/context/useApp.ts
-
curl -L -o useApp.ts https://huggingface.co/spaces/Samfredoly/jor/resolve/main/src/context/useApp.ts
236 Bytes
| import { useContext } from 'react' | |
| import { AppContext } from './context' | |
| export function useApp() { | |
| const context = useContext(AppContext) | |
| if (!context) throw new Error('useApp must be used within AppProvider') | |
| return context | |
| } | |