Skip to content

aholachek/review-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sometimes it's helpful to review the basic building blocks of front end development. In this repo you'll find a few short exercises you can do to (re)familiarize yourself with the fetch function.

This repo asks you to write two wrapper functions, get and post, that make interacting with the base fetch api easier (and add some light additional functionality).

To get started

  1. Clone repo
  2. Run yarn
  3. Run yarn start. You should see a page of failing tests on localhost:8000.
  4. Write code in index.js to solve the tests.

Hints

  1. Use the debugger statement liberally to introspect what is being returned by your fetch calls.
  2. The tests expect your function to return an object that looks like this: { data: {}, error: {} }, with either data or error keys depending on whether the fetch request succesfully completed.
  3. Possible solutions can be found in the solutions branch.

Learn about (or review) fetch

  1. Using Fetch by Mozilla
  2. Introduction to Fetch by Google

About

Code exercises to help you solidify your knowledge of fetch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published