Objective: Fetch and display Pokémon data using React.
React
Instructions:
Create a React component named PokemonFetcher.
PokemonFetcher
The component should fetch data from the Pokémon API: https://pokeapi.co/api/v2/pokemon/ditto.
https://pokeapi.co/api/v2/pokemon/ditto
Display the Pokémon’s name inside an <h1> tag.
<h1>
Display an image of the Pokémon using the <img> tag. Use the sprites.front_default field from the API response for the image URL.
<img>
sprites.front_default
Requirements:
useEffect
useState
Hints:
fetch
Bonus: