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

Function Counter

04React/Day06/vite-project/src/Counter.jsx:3–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useState } from "react";
2
3function Counter(){
4 const [count,setCount] = useState(0);
5 return (
6 <>
7 <h1>Counter Application of mne:{count}</h1>
8 <button onClick={()=>setCount(count+1)}>Increment</button>
9 <button onClick={()=>setCount(count-1)}>Decrement</button>
10 </>
11 )
12}
13
14export default Counter;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected