I would like to convert this vanilla JS function to a react functional component to toggle CSS classes, do you guys know what should be the best approach to toggle these cla