Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { useState } from 'react';
- const Counter = () => {
- const [count, setCount] = useState(0);
- return (
- <div>
- <p> You've clicked the button {count} times. </p>
- <button onClick={() => setCount(count + 1)}>Click Me </button>
- </div>
- )
- }
- export default Counter;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement