API: API is an abbreviation for Application Programming Interface which is a collection of communication protocols and subroutines used by various programs to communicate between them. A programmer can make use of various API tools to make its program easier and simpler. Also, an API facilitates the programmers with an efficient way to develop their software programs.
Step by step implementation to fetch data from an api in react.
Step 1: Create React Project npm create-react-app MY-APP
Step 2: Change your directory and enter your main folder charting as cd MY-APP
Step 3: API endpoint
https://jsonplaceholder.typicode.com/users
Step 4: Write code in App.js to fetch data from API and we are using fetch function.