React JS Tutorial for Beginners #4 | Fetch Data from Laravel API to Show on React App via Axios

preview_player
Показать описание
React JS Tutorial from Beginning:

In this video, we are going to fetch the user's data from the database that is connected with our Laravel 9 website at the back end and will show on React App at the front end via Axios.

Axios is a javascript library that we use to make HTTP requests.

1) Install Axios:-
First, we have to install the Axios library for our React App Project.
npm install axios

2) Import Axios:-
import axios from "axios";

Syntax:-
const [state, setState] = useState(initialstate)

Points to notice in the above Syntax :-
* const is the short form of constant
* useState is a Hook that allows having state variables in functional components
* first element is the initial state and the second one is a function that is used for updating the state

Popular Stack Developers Series that can help you:-

►Join this channel to get the complete source code of all series:

Follow Stack Developers on Social Media to get updates and resolve your queries

#reactjs #reactjstutorial #reactjsforbeginners #reactjscourse
Рекомендации по теме
Комментарии
Автор

So interesting for me, which method you are going to use for authentication? sanctum? passport or cookie based auth ? because each one has its own style.

Ali_M_UOE
Автор

I have need this laravel api please mail your source code

jaipurcrmsolutions
join shbcf.ru