Instead of doing this:
document.querySelector(".class1").addEventListener('wheel', this.doSomething)
I want to do something like this:
document.querySelector(this.state.currentClass).addEventListener('wheel', this.doSomething)
Is it possible? The other workaround I can think of is like this:
let temp = "." + this.state.currentClass;
document.querySelector(temp).addEventListener('wheel', this.doSomething);
Is there a standard or more optimal way of doing this?