My goal was to create an app to check Global Coronavirus cases with maps and chart
NB: Install "yarn" if you have not, using
npm install --global yarn
-
Install dependencies
yarn
-
Start the server
yarn start
-
Happy coding! 😂🤗
- Axios
- use-axios-client - an axios library to fetch data
- react-leaflet - A react wrapper for leaflet.js
- I used 'css modules' for styling
- Used 'use-axios-client' an axios library, to handle HTTP requests.
- I made use of 'leaflet.js' map to display the map
- Each individual components can be found inside the components folder
- The pages can be found in the pages folder
- All styles can be found in the styles folder
- The application fetches Real Time Coronavirus cases data data from the diseases api
- I used 'use-axios-client', an Axios library which make HTTP request and handling error easier. This helped me get to know how Axios work and how to use it.
- I used 'react-leaflet' to load the leaflet map
- I had challenges with displaying the map. The compiler was unable to compile the libary 'react-leaflet' code because it was using nullish coalescing (??). I solved this challenge by editing my package.json and putting:
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
]
and deleting the ".cache" folder in node_modules, then restarting the server.