Skip to content

Instantly share code, notes, and snippets.

@h-agharezaei
Created March 22, 2025 12:19
Show Gist options
  • Save h-agharezaei/ac3407508cf350d02037cd83557fdbe0 to your computer and use it in GitHub Desktop.
Save h-agharezaei/ac3407508cf350d02037cd83557fdbe0 to your computer and use it in GitHub Desktop.
import { useState } from "react";
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>افزایش</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment