Technical assignment using the PokéApi & YodaAPI.
This is a Next.js project bootstrapped with create-next-app.
To run this project on your local machine, follow these steps:
- Clone this repository.
- Open your terminal and navigate to the project directory.
- Run the following commands:
npm install
npm run dev
This will start the application in development mode.
To run the tests:
npm test
Users should be able to:
- View all 151 original Pokémon in searchable list
- Paginate through list with load more button
- Click on any Pokémon and view their stats & abilities
- Navigate to previous and next Pokémon
- Translate the ability effects into yoda language and receive an error message when hitting the rate limit.
- Live Site: Live
- TypeScript
- Next.js 14
- TailwindCSS
- Radix UI
- TanStack Query
- Jest, React Testing Library
- Vercel
- PokéAPI
- YodaAPI
- Translating the effect from English to Yoda required fetching data on the client side. Despite the ability to use server actions in client components, I chose to use TanStack Query because it offers an excellent experience for data fetching and caching. Additionally, caching was crucial due to the rate limit of the Yoda API, which helps prevent unnecessary data requests.
- One area I would like to explore is utilising TanStack Query for pagination with server components, as the initial Pokémon list data is rendered on the server. Currently, when users load more Pokémon, the data is not cached, meaning they would have to fetch those Pokémon again if they navigate away from the page and return.