This React application retrieves a list of Pokemon from the PokeAPI and stores the list persistently using TypeScript, Redux Toolkit, and RTK Query. Upon clicking an item in the list, the application displays the details of the corresponding Pokemon.
- Retrieves a list of Pokemon from the PokeAPI
- Stores the list persistently using Redux Toolkit and RTK Query
- Displays details of the selected Pokemon when clicked
- Written in TypeScript for type safety
- Unit tests for both screens ensure reliability and correctness
- Clone the repository to your local machine:
git clone https://github.com/mbilalsiddique1/pokedox.git
- Navigate to the project directory:
cd pokedox
- Install dependencies:
npm install
The application start script can be configured to use different BASE API URLs. You can set the BASE API URLs by modifying environment variables in a .env
file:
REACT_APP_BASE_API_URL=https://pokeapi.co/api/v2/
To run the application, use the following command:
npm start
This will start the development server, and the application will be accessible at http://localhost:3000.
To run unit tests, use the following command:
npm test
This will run all unit tests and display the coverage report. The application aims to achieve at least 60% coverage of unit and integration testing to ensure reliability and correctness.
- GET - https://pokeapi.co/api/v2/pokemon/: Retrieves a list of Pokemon.
- GET - https://pokeapi.co/api/v2/pokemon/1/: Retrieves details of a specific Pokemon (e.g., Pokemon with ID 1).
This README provides detailed instructions on how to run the application, configure environment variables.