How to use Hook in Reactjs || useState||



 





mport React from "react";
import { useState } from "react";

const  Login = () => {
    const [count, setcount] = useState(0);
    return (
    <div>
    <div> login </div>
    <p>you clicked  {count} times </p>
    <button onClick = {()=> setcount(count + 1)}> clicked </button>
    </div>
    );
}
export default Login;






output :










you see on this code on video click bellow video:



Post a Comment

0 Comments