Your mission is to complete this Pokedex app, using Vue and your frontend knowledge. When you have reached the end of the test you should have something like this:
-
Implement the
getPokemonandgetRandomPokemonfunctions insrc/api/index.jsto consume the PokeAPI. You can use axios or fetch to communicate with the API, whichever you prefer. -
Finish the
PokemonCardcomponent by adding the official artwork sprite image and appropriate base stats to the table in the cells marked "INSERT STAT". You can refer to the PokeAPI Pokemon endpoint documentation for the data structure, for example you can access the HP base stat like sopokemon.stats[0].base_stat. -
When the app is first mounted, we want to show a random Pokemon using the
getRandomPokemonfunction and thePokemonCardcomponent. While fetching data, you should show a loading spinner using theLoadercomponent. -
Add the ability to search for a Pokemon by name or a National Pokedex number using the
SearchFieldcomponent and thegetPokemonfunction. You should debounce the search to reduce the number of API requests while typing in the field by using thedebouncefunction fromlodash-es. Note: The API expects names to be lowercase, so you should transform the value before sending the request. -
Bonus: Implement the steps above using the new Composition API instead of the Options API.
