This project demonstrates different ways to get data from APIs using React.
You can use the UseEffect hook and fetch or the axios library to get,post,delete or update data.
You can also write custom functions and incoporate fetch or axios and useState to get data and manage the state of different components.
This post goes into more detail of the code in this repo.