Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1 KB

README.md

File metadata and controls

32 lines (21 loc) · 1 KB

React Client App

This project was bootstrapped with Create React App.

Project Structure

App.js

This is where all of our React components live. Notice the App component doesn't make API calls directly, but delegates that responsibility to the apiClient module.

apiClient.js

The functions in this module are responsible for talking to the Express API server.

We use the browser built-in fetch function to perform the HTTP communication.

Notice that we always translate the reponse from JSON to JavaScript object using the Body.json() method.

Proxy the Express Server

See the Create React App documentation for an explanation of why we want to proxy our API server.