This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// full code link: https://codesandbox.io/s/tailwind-react-hamburger-menu-tjhfyx | |
import { useState } from "react"; // import state | |
export default function Header() { | |
const [isNavOpen, setIsNavOpen] = useState(false); // initiate isNavOpen state with false | |
return ( | |
<div className="flex items-center justify-between border-b border-gray-400 py-8"> | |
<a href="/"> |
OlderNewer