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

Function ConditionalTest

src/script.ts:384–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

382};
383
384const ConditionalTest = () => {
385 const [cond, setCond] = React.useState(false);
386
387 return React.createElement(
388 "div",
389 null,
390 React.createElement("button", {
391 innerText: "toggle",
392 onclick: () => {
393 setCond(!cond);
394 },
395 }),
396 cond &&
397 React.createElement("div", {
398 innerText: "look at me!!",
399 })
400 );
401};
402
403const AddItemsTest = () => {
404 const [items, setItems] = React.useState([3]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected