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

Function Increment

src/script.ts:174–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172 );
173};
174export const Increment = () => {
175 const [x, setX] = React.useState(2);
176 console.log("re-running and reading", x);
177 return React.createElement(
178 "div",
179 {
180 style: "color:blue",
181 },
182 React.createElement("button", {
183 innerText: "so many counters me:" + x,
184 onclick: () => {
185 setX(x + 1);
186 },
187 style: "color: orange",
188 })
189 );
190};
191export const SimpleChild = () => {
192 return React.createElement("h2", {
193 innerText: "Im a simple child!!",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected