Javascript – Using useEffect in React to change API request
I am learning React hooks and made a project to display a random Pokemon name through https://pokeapi.co/docs/v2#pokemon by calling a random Pokemon ID. I'm not quite sure how to trigger the useEffect to fetch after clicking on the button. import…