Looking to enhance my React app by adding a NavBar with dropdown functionality. Here's the code snippet:
<ul id="dropdown1" className="dropdown-content">
<li><NavLink to="/create">Create lessons</NavLink></li>*/}
<li><NavLink to="/lessons">Lessons</NavLink></li>
<li><NavLink to="/quizes">Quizes</NavLink></li>
<li><NavLink to="/quizcreator">Create QuizGame</NavLink></li>
<li></li>
<li></li>
</ul>
<nav>
<div className="nav-wrapper">
<a href="#!" className="brand-logo">Logo</a>
<ul className="right hide-on-med-and-down">
<li><NavLink to="/home">Home</NavLink></li>
<li><a className="dropdown-trigger" href="#!" data-target="dropdown1">Dropdown<i
className="material-icons right">arrow_drop_down</i></a></li>
<li><a href="/" onClick={logoutHandler}>Logout</a></li>
</ul>
</div>
</nav>
https://i.stack.imgur.com/MEBM1.png
Interested in making the dropdown menu open on click or hover, as demonstrated in this materialize css example.
$(".dropdown-trigger").dropdown();
Seeking guidance on where to insert this code for my MERN stack application.