MUI makeStyles() class applied but styles not reflecting when using classList.add(‘class-name’)

I am using MUI makeStyles() to write a bunch of CSS classes. And out of these classes, I am dynamically adding and removing one class to my Box element on file drag-and-drop events.

The class is successfully applied and I can even see it getting applied while I drag a file over my element. However, I can’t see the styles inside the class being applied to my element. I am not sure what is going wrong and any help would be appreciated.

Here is my code snippet –

Code snippet for image uploader component

CSS class written inside makeStyles which is dynamically added

classList is being used to add and remove image uploader drop class