MCPcopy Create free account
hub / github.com/RobPruzan/react-scratch / ContextTest

Function ContextTest

src/script.ts:581–592  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

579
580const TestContext = React.createContext({ hello: 2 });
581const ContextTest = () => {
582 const readContext = React.useContext(TestContext);
583
584 console.log("being rendered");
585 console.log(readContext);
586
587 return React.createElement(
588 "span",
589 { innerText: "test" + readContext.hello },
590 React.createElement(EvenLower, null)
591 );
592};
593
594const EvenLower = () => {
595 const readContext = React.useContext(TestContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected