I am building a custom navbar in React using TailwindCss for styling. For reference I am following a tutorial on YouTube which’s code can be found here.
When I use the mobile breakpoints as prefix like in the example below only the div saying “mobile” works as it should be:
<nav>
<div className={"flex"}>
<div className={"hidden md:flex"}>desktop</div>
<div className={"md:hidden"}>mobile</div>
</div>
</nav>
The output “desktop” should be shown when the text “mobile” vanishes but for some reason it doesn’t. Am I doing something wrong or is there a problem with Tailwind?