Setting Up the Frontend for It to Be Making Requests to the Server

Assuming that you’ve not set up anything. Step 1: Installing Axios npm install axios Step 2: Importing and sending request 1 2 3 4 5 6 7 import axios from 'axios' axios .get('http://localhost:3001/notes') .then(response => { const notes = response.data console.log(notes) }) For most part, that will suffice. However, you might want to call the data via an effect hook. ...

August 25, 2021 · 1 min · Lei