MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / Provider

Function Provider

context-trap/src/App5.tsx:17–33  ·  view source on GitHub ↗
({ children })

Source from the content-addressed store, hash-verified

15});
16
17const Provider: FC<PropsWithChildren> = ({ children }) => {
18 const [aaa, setAaa] = useState(0);
19 const [bbb, setBbb] = useState(0);
20
21 return (
22 <context.Provider
23 value={{
24 aaa,
25 bbb,
26 setAaa,
27 setBbb
28 }}
29 >
30 {children}
31 </context.Provider>
32 );
33};
34
35const App = () => (
36 <Provider>

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected