how to add html in useState
export default function Navbar() {
how to add html in useState
export default function Navbar() {
how to add html in useState
export default function Navbar() {
how to add html in useState
export default function navbar() {
const [isOpen, setIsOpen] = useState(false);
const handleClick = () => {
setIsOpen(!isOpen)
}
return (
<nav>
<div className="logoBtn">
<div className="logo">
<a href="#"><h1>Logo</h1></a>
</div>
<div className="btn" onClick={handleClick}>
<div className="bar"></div>
<div className="bar"></div>
<div className="bar"></div>
</div>
</div>
<ul className={isOpen ? 'showNav' : und}>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
);
}
how to add html in useState
export default function navbar() {
const [isOpen, setIsOpen] = useState(false);
const handleClick = () => {
setIsOpen(!isOpen)
}
return (
<nav>
<div className="logoBtn">
<div className="logo">
<a href="#"><h1>Logo</h1></a>
</div>
<div className="btn" onClick={handleClick}>
<div className="bar"></div>
<div className="bar"></div>
<div className="bar"></div>
</div>
</div>
<ul className={isOpen ? 'showNav' : und}>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us