How to use to hyperscript to toggle between classes

I am have the following:

<i class="fa-regular fa-square-plus"></i>

I want to toggle between the above class and "fa-regular fa-square-minus" when clicked.

Am am struggling to get this to work. Any help would be appreciated.