SHARE
TWEET

Untitled

a guest Jul 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { useState } from 'react';
  2.  
  3. function Example() {
  4.   // Declare a new state variable, which we'll call "count"
  5.   const [count, setCount] = useState(0);
  6.  
  7.   return (
  8.     <div>
  9.       <p>You clicked {count} times</p>
  10.       <button onClick={() => setCount(count + 1)}>
  11.         Click me
  12.       </button>
  13.     </div>
  14.   );
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top