This is a simple web app that based on the react-boilerplate CRA template.
It currently has two pages, an index and a /countries
page which downloads a list of countries from the CareRev API and displays links to a country detail page. Right now the link leads to a 404. Your task is to add the missing route which will download the details for the selected country and display them.
NOTE: The task is broken up into smaller steps and shouldn't take more than an hour or two in total. If you find yourself stuck on any step, simply note where you ran into any problems and what you were trying to do so we can discuss it later, then move on to the next step.
-
Get the app running with
yarn install
andyarn start
-
Add a route for
/country/:id
-
Add a container for that route which initiates the fetch of
https://api.carerev.com/api/v1/countries/:id
on mount -
Add a saga to fetch that data
-
Add a reducer to save that data in the redux store
-
Add selector(s) to pick data out of the store
-
Display that country's name and currency code in the container when it loads, using the selector(s).
-
Bonus (optional): Add an error view in case the data fetching has a problem.
This added container should function roughly like the existing Countries
container. In the interview, we'll discuss this app, ways to improve it, architectural concepts, best practices and what ideas you think are important in making a strong, reliable and easy to use app.