Thank you for the replies! These seem to be working out great!
@simongray, I agree, this isn’t very idiomatic or clean. However, the original code that I’m trying to fix does not attempt to add an eventlistener, but instead modifies (removes, changes) event listeners that are already attached to the element(s) in various ways, I simply just used addEventListener as a simple example. It would however definitely be a good idea to look into incorporating these into idiomatic React code, for me and for anyone else that stumbles across this forum.