()
| 7 | * Throws if used outside of AppProvider. |
| 8 | */ |
| 9 | export function useAppContext(): AppContextState { |
| 10 | const context = useContext(AppContext); |
| 11 | if (!context) { |
| 12 | throw new Error('useAppContext must be used within an AppProvider'); |
| 13 | } |
| 14 | return context as AppContextState; |
| 15 | } |
no outgoing calls