You could, but you will have to wait for the component to mount first before attaching the event. But, just because you can don't mean you should.
React handles events by delegating the events only when it's needed. Attaching events the addEventListener way can easily slow down the DOM especially if it's done a lot of time. But that aside you can, but do it sparingly.