MCPcopy Create free account
hub / github.com/coderarmy-notes/mern-stack-course / App

Function App

04React/Day06/vite-project/src/App.jsx:4–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4function App(){
5
6 const [count,setCount] = useState([10,20,30]);
7
8 function handleChange(){
9 setCount([...count,40]);
10 }
11
12 return (
13 <>
14 <p>This is the counter for react App</p>
15 <h1>Counter:{count}</h1>
16 <button onClick={handleChange}>Increment</button>
17 {/* <button onClick={()=>setCount(count-1)}>Decrement</button> */}
18 </>
19 )
20}
21
22export default App;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected