-4

Error Picture

    const isSignUp = false;
    const handleChange = () => {};
    const [showPassword, setShowPassword] = useState(false);

    const handlePassword = () =>
        setShowPassword((prevShowPassword) => !prevShowPassword);

I was implementing the password show/hide feature using usestate and I don't understand why I get this error. Do help how to solve it?

Saumya Nayak
  • 21
  • 1
  • 7

1 Answers1

0

Solved !

There was error when I had this :

import useState from "react";

It got solved when I changed it to this :

import { useState } from "react";
Saumya Nayak
  • 21
  • 1
  • 7