MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / App

Function App

playground-test/src/App3.tsx:3–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import Editor from '@monaco-editor/react';
2
3function App() {
4
5 const code =`import { useEffect, useState } from "react";
6
7function App() {
8 const [num, setNum] = useState(() => {
9 const num1 = 1 + 2;
10 const num2 = 2 + 3;
11 return num1 + num2
12 });
13
14 return (
15 <div onClick={() => setNum((prevNum) => prevNum + 1)}>{num}</div>
16 );
17}
18
19export default App;
20`;
21
22 return <Editor height="500px" defaultLanguage="javascript" defaultValue={code} />;
23}
24
25export default App;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected