The goal of this assessment is to test your React skills, including:
- Creating and managing stateful components.
- Passing state as props to child components.
- Building and handling a form as a controlled component.
- Fork & Clone this repository to start working on your assessment.
- This repo contains a React project using Vite.
- after forking & cloning,
npm i - then run
npm run devto open it in the browser
- after forking & cloning,
- Complete the tasks below to build the required application.
- Submit your completed app via
pull requeston the original repo and submit your repo URL to Google Classroom. - You will be using the PokeAPI, here is the base URL:
https://pokeapi.co/api/v2/pokemon
- Example Pokemon Call URL:
https://pokeapi.co/api/v2/pokemon/ditto
- Your App component should hold a string in state for the pokemon we are searching for
- Initialize the state as an empty string. The setter function should be passed down to the SearchBar component. The state variable (getter) should be passed down to the DisplayPokemon component
- Create a SearchBar controlled component where a user can type in the name or ID number of the Pokemon to search for.
- Manage the form's input using controlled components (state-driven input tags: "value" prop, "onChange" prop).
- Pass the setter function as a prop from the App component to the SearchBar component.
- The form should include:
- A text input field.
- A submit button.
- Receive the pokemon state from App.jsx to display the Pokemon within the component.
- Add some basic CSS to make the app visually appealing.
- Make the app responsive to function well despite the user's device.
- There are images in the
assetsfolder to use within the app, as well as a favicon inpublicto use for the browser tab. Make use of them to make your app more appealing.
- Use conditional rendering to display a loading indicator while fetching data.
- Validate the form to ensure the input is not empty before adding a new item.
- App.jsx
- Header.jsx
- SearchBar.jsx
- DisplayPokemon.jsx
- Footer.jsx
- Complete the requirements above.
- Push your completed work to your repository and submit the link on Google Classroom.
- Be prepared to explain how your code works during a follow-up discussion.
Good luck and happy coding! 🚀

