Mastering Axios in React: API Requests, Authentication, and Advanced Techniques | React Tutorial

  Рет қаралды 4,154

Tamil Skillhub

Tamil Skillhub

6 ай бұрын

🚀 Dive deep into Axios in React! In this tutorial, we'll explore step-by-step how to make API requests using Axios. Learn the ins and outs of axios.get and axios.post, and discover the power of axios({method: 'get'}) and axios({method: 'post'}). Uncover the secrets of authenticating your GET requests with a practical example. Explore the world of Axios instances, defaults, and take control with interceptors for both request and response handling. Follow along with coding examples and level up your React skills with this comprehensive Axios guide! 🌐⚛️
Please find the pinned comment example for update and delete request handler
Join this channel to get access to perks:
/ @tamilskillhub

Пікірлер: 17
@muthupandiyan4453
@muthupandiyan4453 6 ай бұрын
Delete and edit video upload pannuga bro
@tamilskillhub
@tamilskillhub 6 ай бұрын
Please find the example for update and delete request handler To Update the product we can use PUT OR PATCH import { useState } from "react"; import axios from "axios"; export default function UpdateProduct() { const [id, setId] = useState(""); const [name, setName] = useState(""); const deleteSpecificProduct = () => { if (id && name) { axios .put(`dummyjson.com/products/${id}`, { title: name }) .then((res) => console.log(res.data)) .catch((err) => console.log(err)); } }; return ( setId(e.target.value)} /> setName(e.target.value)} /> Update Product Name ); } To delete the product we can use DELETE import { useState } from "react"; import axios from "axios"; export default function DeleteProduct() { const [id, setId] = useState(""); const deleteSpecificProduct = () => { if (id) { axios .delete(`dummyjson.com/products/${id}`) .then((res) => console.log(res)) .catch((err) => console.log(err)); } }; return ( setId(e.target.value)} /> Delete Product ); }
@pubgillusiontown5959
@pubgillusiontown5959 6 күн бұрын
Thank you
@tamilskillhub
@tamilskillhub 5 күн бұрын
You're welcome
@vijay0333
@vijay0333 6 ай бұрын
Thank you bro for your knowledge sharing
@tamilskillhub
@tamilskillhub 6 ай бұрын
Thank you
@vijayaselvamc
@vijayaselvamc 3 ай бұрын
Very useful🎉. Thanks
@tamilskillhub
@tamilskillhub 3 ай бұрын
Welcome 😊
@Believer-yk7th
@Believer-yk7th Ай бұрын
Thanks 😊for this video
@tamilskillhub
@tamilskillhub Ай бұрын
Welcome 😊
@tamilskillhub
@tamilskillhub 6 ай бұрын
Please find the example for update and delete request handler To Update the product we can use PUT OR PATCH import { useState } from "react"; import axios from "axios"; export default function UpdateProduct() { const [id, setId] = useState(""); const [name, setName] = useState(""); const deleteSpecificProduct = () => { if (id && name) { axios .put(`dummyjson.com/products/${id}`, { title: name }) .then((res) => console.log(res.data)) .catch((err) => console.log(err)); } }; return ( setId(e.target.value)} /> setName(e.target.value)} /> Update Product Name ); } To delete the product we can use DELETE import { useState } from "react"; import axios from "axios"; export default function DeleteProduct() { const [id, setId] = useState(""); const deleteSpecificProduct = () => { if (id) { axios .delete(`dummyjson.com/products/${id}`) .then((res) => console.log(res)) .catch((err) => console.log(err)); } }; return ( setId(e.target.value)} /> Delete Product ); }
@eherman810
@eherman810 2 ай бұрын
hi bro thank u for making this video. normal la api use panna network tap la esay ya security key with api pathukalam but yapadi secure key and api yarum pakama secure ra api-ya use panurathu? .env file illama? request ta onclick-la api poratha change or restrict pana madiuma react la ? video panuka bro rompa help full-la erukum thank you.
@tamilskillhub
@tamilskillhub 2 ай бұрын
Stay tuned
@ragucool9468
@ragucool9468 6 ай бұрын
React redux with JWT Authentication - Sign up, Login, Logout & Private Route(access and refresh token redux state management ).how to handle token or session(state management redex store) in enterprice level application ....thanks in advance bro ... eagarly waiting bro..create enterprice level small application ( like ecommerce with cover all topics bro)
@tamilskillhub
@tamilskillhub 6 ай бұрын
Stay tuned
@ragucool9468
@ragucool9468 6 ай бұрын
@@tamilskillhub thanks ....eagarly waiting bro
@entirefactory7137
@entirefactory7137 6 ай бұрын
good idea bro
React Form Validation with Formik: A Comprehensive Guide
43:26
Tamil Skillhub
Рет қаралды 772
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 12 МЛН
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 32 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 14 МЛН
React State Management - Intermediate JavaScript Course
2:46:38
freeCodeCamp.org
Рет қаралды 245 М.
Build a Fullstack Login & Register Page with MERN (react.js, mongo, express, bcrypt, jwt & more)
1:50:04
React JS for Beginners in Tamil | Full Video
2:49:23
JVL code
Рет қаралды 94 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 442 М.
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 12 МЛН