mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Step 2.9: Service Calls (Exercise)
Note: this step doesn't work with the live site on github.io. Clone this repo to try this step out
If you don't already have the app running, start it by running npm start from the root of the frontend-bootcamp folder. Click the "exercise" link under day 2 step 9 to see results.
-
open up
exercise/src/service/index.tsand study the signature of the functions to call the service such as theadd()function -
open
exercise/src/actions/index.tsand fill in the missing content insideactionsWithService
- note that the
completeandclearfunctions require you to write your own wrapper function
- open
exercise/src/index.tsxand follow the instructions in the TODO comment to make the app prepopulate with data from the service.