/pokeproblem

Small hiring exercise; borrowed from theo.gg around his hiring process for developers working with react

Primary LanguageTypeScriptMIT LicenseMIT

PokeProblem

To run project locally:

npm install
npm run dev

Part 1

Provided a Pokemon javascript object structured as such:

const bulbasaur = {
  id: 1,
  name: "Bulbasaur",
  types: ["grass"],
  sprite: "https://pokemon.com/pictures/bulbasaur.png"
}

...create a reusable component (or the equivalent in your framework) that takes in bulbasaur as a property and renders a row with the name, id, type and sprite image

Part 2

Provided a Pokemon javascript array structured as such:

const pokemonArray = [
{
  id: 1,
  name: "Bulbasaur",
  types: ["grass"],
  sprite: "https://pokemon.com/pictures/bulbasaur.png"
}, {
  id: 2,
  ...
}, ...]

..create a component that takes in the array and renders all the pokemon in that array.

Part 3

Provided a component with the following props

type PokemonTypeSelectionProps = {
  selectedType: string | undefined;
  selectType: (type: string | undefined) => void;
}

...create a component that renders both the component and component. Make sure you only display Pokemon with the selected type!