MCPcopy
hub / github.com/vercel/next-app-router-playground / useCounter

Function useCounter

app/context/counter-context.tsx:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18export 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}

Callers 2

ContextClickCounterFunction · 0.90
CounterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected