Demo

By Naresh Sadasivam24d ago (Dec 23, 2025)

Demo

javascript
import { useState } from 'react';

function Counter() {
  const [count, setCount] = useState(0);
  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={() => setCount(count + 1)}>
        Increment
      </button>
    </div>
  );
}

Views

0

Lines

13

Characters

248

Likes

0

Details

Language
Javascript
Created
Dec 23, 2025
Updated
24d ago
Size
0.2 KB

Build your snippet library

Join thousands of developers organizing and sharing code snippets.

Demo - Snippets Library