JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" class="click-to-toggle">Toggle This Dropdown
<i>
<ul style="display:none">
    <li><a href="#">How To Do This</a>

    </li>
    <li><a href="#">Installing in The Mid 90s</a>

    </li>
</ul>
</i>
</a>

JavaScript

var button = document.querySelector('.click-to-toggle');

button.addEventListener('click', function (event) {

    var next = this.nextElementSibling;

    if (next.style.display == "none") {
        next.style.display = "block";

    } else {
        next.style.display = "none";
    }
});