Online demo: https://whereintheworld-fe-challenge.vercel.app/
Read more details in challenge description.
This project was bootstrapped with Create React App.
- Add
.nvmrc
to specify the Node version. (ref: https://github.com/nvm-sh/nvm#nvmrc) - Use components and icons from Material-UI.
- Use husky and lint-staged to lint code before commit.
- Use Redux Toolkit to write Redux and RTK Query for data fetching.
- Deploy by Vercel.
# install dependencies
npm install
# runs the app in development mode. open http://localhost:3000 to view it in the browser.
npm start
# build for development
npm run build
components
: shared components, basic layout componentconstants
: values not from API, like region list for filter optionshooks
: custom hooks which can be used in different componentspages
: the "views" users can access, in this project we have homepage, country detail page and not found pagereduxModules
: redux store and RTK query configurationstyles
: split style configurations in different stylesheet like colors, fonts, breakpoints, etc.
- See all countries from the API on the homepage
- Search for a country using an
input
field - Filter countries by region
- Click on a country to see more detailed information on a separate page
- Click through to the border countries on the detail page
- Toggle the color scheme between light and dark mode (optional, but nice to have)
- Use React Hook
- Display skeleton during the data fetching for a better user expierence.
- Inifinte scrolling to load countries.
- Display not found message when there's no match in the search name and region.
- Display the back to top button for user can scroll back up quicky both on laptop and mobile devices.
- Display not found page if users enter the invalid URLs.
- Save users color schema preference prevent resetting after refreshing the page.
- Display
-
for empty field instead of leaving it the blank. - Display the error message for invalid country code.