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

Function ActionButton

src/script.ts:326–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324};
325
326const ActionButton = () => {
327 const testReadContext = React.useContext(TestContext);
328 console.log({ testReadContext });
329 return React.createElement(
330 "div",
331 {
332 id: "action-button",
333 style: "padding: 5px; margin: 5px; border: 1px solid green;",
334 },
335 React.createElement("button", {
336 onclick: () => alert("Action performed!"),
337 innerText: "Perform Action, reading value of: " + testReadContext.hello,
338 })
339 );
340};
341
342export const MainComponent = ({ children }: any) => {
343 const [x, setX] = React.useState(2);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected