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

Function SimpleParent

src/script.ts:109–129  ·  view source on GitHub ↗
(props: any)

Source from the content-addressed store, hash-verified

107};
108
109export const SimpleParent = (props: any) => {
110 const [x, setX] = React.useState(2);
111 return React.createElement(
112 "div",
113 null,
114 React.createElement("button", {
115 onclick: () => {
116 // setTimeout(() => {
117 // console.log("doing it!!");
118 // document.getElementById("nest-this")!.id = "test";
119 // }, 1500);
120 setX(x + 1);
121 },
122 innerText: "trigger update",
123 }),
124 React.createElement("div", {
125 innerText: "parent of the simple parent",
126 }),
127 ...props.children
128 );
129};
130export const NestThis = () => {
131 const [x, setX] = React.useState(2);
132 return React.createElement(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected