apne channel ko india me promote karo sir, aap ke Jaisa premium content pure youtube par nahi hai, paid course bhi aapki teaching skills se neeche hain,. superb Aadil sir, thanks very much.
sir meray pass ma jab text box ma value dal raha hu tu wo direct 2 sey shuru ho rahe hey shuru ma 0 hey likha ma code dehta hu apko apna import React, { useEffect, useRef, useState } from "react"; function UncontrolledcomponentD() { const [name, setname] = useState(""); // const [count, setcount] = useState(0); const count = useRef(0); useEffect(() => { // setcount(count + 1); count.current = count.current + 1; }); return (
Enter your name setname(e.target.value)} /> re render count:{count.current}
apne channel ko india me promote karo sir, aap ke Jaisa premium content pure youtube par nahi hai, paid course bhi aapki teaching skills se neeche hain,. superb Aadil sir, thanks very much.
Nobody at entire TH-cam can explain react like this.. Thank u adil sir❤❤lots of love from 🇮🇳India
Thanks a lot dear :)
❤❤❤❤❤❤❤❤
Best lecture on useRef
Very Good Explaination Allah pak ap ko kush rakhay❤❤
Nobody at entire TH-cam can explain react like this
Masha Allah
Lovely ❤❤
at 19:44, count start with 2 because ueeffect takes first count as it renders
yes i have also same problem
Best mentor
sir koi eact projects ki series bana do
sir meray pass ma jab text box ma value dal raha hu tu wo direct 2 sey shuru ho rahe hey shuru ma 0 hey likha ma code dehta hu apko apna import React, { useEffect, useRef, useState } from "react";
function UncontrolledcomponentD() {
const [name, setname] = useState("");
// const [count, setcount] = useState(0);
const count = useRef(0);
useEffect(() => {
// setcount(count + 1);
count.current = count.current + 1;
});
return (
Enter your name
setname(e.target.value)}
/>
re render count:{count.current}
);
}
export default UncontrolledcomponentD;
very well explanation as always ...
😘
mine count is starting with 2
i do not know what is the issue