React JS 37 - Java Script Fetch Function to GET Data From API in React JS With Functional Component

Pubblicato il: 21 giugno 2021
sul canale di: THE PRACTICAL IT
83
5

How to use the javascript's native fetch function to read data from the server. This is a comparison of the axios get to read data from the given API. Fetch is a built in function provided by JavaScript for GET, POST, PUT, PATCH and DELETE data with the right url and right properties.

The git repo for this one is at https://github.com/practicalit/tutori...

In this example we are showing that the default usage of the GET is implemented. But, as needed, all the HTTP methods can be used to read data from the server or to send data to the server.

Using the fetch is similar both in the functional and class components. Here the video is showing how we can use it on the functional component but it is quite the same on the usage as far to use it with class components as well.

Also, this video shows how to use refs with fetch in react js. On later videos we will be showing the usage of the useState in the implementation for updating the value of the div that is shown. But, using useRef, we can assign the value or data that we want to the given div element.


In questa pagina del sito puoi guardare il video online React JS 37 - Java Script Fetch Function to GET Data From API in React JS With Functional Component della durata di ore minuti seconda in buona qualità , che l'utente ha caricato THE PRACTICAL IT 21 giugno 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 83 volte e gli è piaciuto 5 spettatori. Buona visione!