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

Function Component

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

Source from the content-addressed store, hash-verified

82 return React.createElement("div", { innerText: "im a child!" });
83};
84export const Component = (props: any) => {
85 const [x, setX] = React.useState(2);
86 return React.createElement(
87 "div",
88 {
89 lol: "ok",
90 },
91 React.createElement("button", {
92 innerText: "so many counters me",
93 onclick: () => {
94 setX(x + 1);
95 },
96 }),
97 React.createElement("div", {
98 innerText: `look at this count?: ${x}`,
99 style: "color:white;",
100 }),
101 React.createElement(Bar, null),
102
103 React.createElement("span", {
104 innerText: "im a span!",
105 })
106 );
107};
108
109export const SimpleParent = (props: any) => {
110 const [x, setX] = React.useState(2);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected