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

Опубликовано: 21 Июнь 2021
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн React JS 37 - Java Script Fetch Function to GET Data From API in React JS With Functional Component длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь THE PRACTICAL IT 21 Июнь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 83 раз и оно понравилось 5 зрителям. Приятного просмотра!