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

preview_player
Показать описание

Please find the pinned comment example for update and delete request handler

Join this channel to get access to perks:
Рекомендации по теме
Комментарии
Автор

Delete and edit video upload pannuga bro

muthupandiyan
Автор

Thank you bro for your knowledge sharing

vijay
Автор

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.

eherman
Автор

409 error oda response eppadi access panrathu bro

mohammedmohsin
Автор

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
.then((res) => console.log(res.data))
.catch((err) => console.log(err));
}
};

return (
<div className="App">
<input
type="number"
value={id}
placeholder="Enter Id"
onChange={(e) => setId(e.target.value)}
/>
<input
type="text"
value={name}
placeholder="Enter Title"
onChange={(e) => setName(e.target.value)}
/>
<button Product Name</button>
</div>
);
}

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
.then((res) => console.log(res))
.catch((err) => console.log(err));
}
};

return (
<div className="App">
<input
type="text"
value={id}
placeholder="Enter Id"
onChange={(e) => setId(e.target.value)}
/>
<button Product</button>
</div>
);
}

tamilskillhub
Автор

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)

ragucool