()
| 16 | } |
| 17 | |
| 18 | export function useCounter() { |
| 19 | const context = React.useContext(CounterContext); |
| 20 | if (context === undefined) { |
| 21 | throw new Error('useCounter must be used within a CounterProvider'); |
| 22 | } |
| 23 | return context; |
| 24 | } |
no outgoing calls
no test coverage detected