I'm making a Pokedex using PokeAPI I'm trying to add addEventListener('click', ...)addEventListener('click', ...) to every Pokémon element so I can use it to open a Modal with the detailed Pokémon info As I'm fetching info from the API, I'm getting errors. I can't seem to find a way to add those eventListeners after the fetch I googled it for hours and was reading about callbacks and async/await, but coudn't make it work... I even tried to use a global "reader" to see if any fetch is completed in the page and managed to console.log every entry after they finish fetch, unsuccesful The code in Screenshot is pretty much all JS code I have
Any help?
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Reactiflux
The best chat community for professionals using React or React Native