Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x | // src/context/ApiContext.tsx
import { createContext } from 'react';
import * as apiClient from '../services/apiClient';
/**
* Defines the shape of the context value, which includes all our API client functions.
* This allows us to inject the entire API client as a dependency.
*/
type ApiContextType = typeof apiClient;
/**
* Creates the React Context for the API client.
* It's initialized with the actual apiClient module.
*/
export const ApiContext = createContext<ApiContextType>(apiClient);
|