import React, { useState } from 'react'; function Counter() { const [count, setCount] = useState(0); return ( <div> <p>شمارش: {count}</p> <button onClick={() => setCount(count + 1)}>افزایش</button> </div> ); } export default Counter;