let [value, setValue] = useState(0) const addValue = () => { if (value == 20){ setValue(value = 20) } else{ setValue(value+1) } } const removeValue = () => { if (value > 0){ setValue(value - 1) } else{ setValue(value = 0) } } This is the whole solution ! Sir your teaching style is just extraordinary , so humble, so many clarity ! Thank you so much ❤❤❤❤❤❤❤❤❤❤❤❤❤❤👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
Hooks in React ⚛ Intro 0:00 Start 2:21 creating the project 2:30 UI updation with simple JS 8:00 Problem in UI updation with JS 10:50 Hooks in React intro 13:00 Hooks (useState) implementation 15:13 Assignment 26:11 Conclude 27:14 Thank you sir.
@dharmeshtanwar2183 ай бұрын
Thankyou bhai for all such details
@unknown-dy8sy Жыл бұрын
React is temporary but Hitesh sir explanations are permanent 🎉
@chaiaurcode Жыл бұрын
😍
@naraynwetal6544 Жыл бұрын
Absolutely right
@rsonentertainment1227 Жыл бұрын
Baap of coding channel in youtube. ("Thanks");
@asadorakzaipti Жыл бұрын
Why temporary?
@akshaychavhan955111 ай бұрын
thats right
@navodithmondal48612 ай бұрын
Homework -- just add -- if (counter = 1) // in removeValue function and then do setCounter this ensures that counter will only be updated if the current value in counter is between 0-20. thank you sir, keep the knowledge coming...❤
@myproject6768 Жыл бұрын
// For decrease if (counter > 0 ) setCounter( counter -1); // For add if ( counter < 30) setCounter ( counter+1) Itne achche s smjaya ki assignment me sochna hi nhi padha
@TechAsad9 ай бұрын
if(Counter==0){ SetCounter(0) }
@deveshsharma5348 ай бұрын
hn tabhi error show kr rha h kuki dimag hi nhi lgaya
@ayushpanchal20537 ай бұрын
itna chhota assignment?
@sagarsen15758 ай бұрын
Appne itna achhe se samjhaya ki video khatam ho ne se pehelei assignment khatam ho gya function increment(){ if(counter + 1 > 20){ alert("Limit exceed") } else { setCounter(counter+1) console.log(counter); } } function decrement(){ if(counter-1 < 0){ alert("Value cannot be negetive") } else { setCounter(counter-1) console.log(counter) } }
@vishnubdh72885 ай бұрын
same here
@ajitrai93174 ай бұрын
alert("Limit exceed") ek number bhai
@purposedriven6332 Жыл бұрын
25:11 state changes are asynchronous that's why the value in console is not being updated immediately. An important detail that got overlooked in the video, maybe because the agenda for this one is a little different. Keep the good work up, very helpful......
@kritarthapatowary72898 ай бұрын
This comment needs to be at top.
@g.guruprasad23156 ай бұрын
Bro Really thank you bro, I am breaking my head since last 3 days why it not updating same value.. Really thanks Man
@g.guruprasad23156 ай бұрын
Hello Bro, {setCount((count)); console.log(await count); count++; }}> count is {count} Bro I have tried using async and await but, let me give example : when I have clicked the button 1st it is logged 1 and i have tried again but it again logged 1 and i tried once more but it logged 2, on again clicking it logged 2, this means the value of the count is changing when the button is pressed twice Please do replay Bro
@g.guruprasad23156 ай бұрын
function App() { let [count, setCount] = useState(0) if(count>=20 || count Add by one { setCount((count-1)); ; console.log(count-1); }}> Subract by one ) } I think this will be the correct now
@godkillyt71454 ай бұрын
@@g.guruprasad2315 bro remove setCount((count)) and await your code will run properly and I don't think await works in console.log
@jagadishpundir41252 ай бұрын
Here is the logic of the assignment for all the peeps here for this lovely course by sir!! let [counter , setCounter] = useState(0); const increase = () =>{ if (counter < 20) { setCounter(counter + 1); } else { console.log("Counter cannot go above 20"); } } const decrease = () => { if (counter > 0) { setCounter(counter - 1); } else { console.log("Counter cannot go below 0"); } };
@decent7198 ай бұрын
End level explanations.No what matter what your mood is but when you see his smile your inner coder wake's up and then you forget clocking is ticking.
@muhammadhilal580710 ай бұрын
The way you teach is really clam most of the youtubers rush in teaching idk why. The calm manner really boost up the confidence. Newly subscribed :)
@kinlearn4 ай бұрын
17:36 samajh gaye sir ji.. bahut hi practice example se aapne realise karva diya ki react ki kya jarurat aur power hai aur react exactly kya problem solve karta hai.. 🙌
@SAURABHKUMAR-dr9ubАй бұрын
"jab bahar dosto ke sath khel rhe ho ya / time spend kar rhe ho , toh 1 ghanta aise chutkiyo mei beet jaata hai but agar wahi padhne baithe toh 1 ghanta 10 ghanta lagta h " aapke videos dekh ke kabhi time ka andaza nhi hota kyuki itni saralta se samjhaya hota hai !! thank you sir/bhaiya !!
@Muhammadamir-kx2jx Жыл бұрын
Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.
@saikrishna-or5qj Жыл бұрын
The way of explaining is awesome. Linking the real world example with the concepts, no one can explain like u sir. I am grateful that learning things from a great professional.Thankyou for the such a amazing content sir.
@Anil-vh1fu Жыл бұрын
After 1 month of upload & Comment is full of motivation + more than 500 [currently [1369], I am loving how students are appreciating guru ❤ I have been following from Main channel Javascript series from 2k18... But examples and explanation in native language is damnn attraction to these languages
@AdityaMehta-v9x16 күн бұрын
agar ye video clg first year me mili hoti to aaj mai ek accha sa web developer hota .Thanks bhaiya for this and javascript series .
@priyankasaini7204 Жыл бұрын
27:22 " react k basics ho gye h" , this line brings a smile 😊😂😇on my face because sir m thoda dari hui thi react k naam se ..pr aap bahut chill ho ..itni aashani se sab samjha dete ho .. now I am confident ki aap padhaoge to m sikh jaugnig...Thankyou sir❤❤❤ Mane apki Chai with Javascript series b dekhi h .. and it was amazing. ❣❣❣❣
@stocksandbeyond Жыл бұрын
I have Completed My React series From some other KZbin Channel some Concepts Got cleard there But I was still Having Doubts i was creating some basic projects with that knowledge but still having some doubts So i decided to take a look at your course and it was like a miracle the knowledge given here by Hitesh sir is immense and deep u basically understand how the react works rather than just therotical knowledge . Thank You Hitesh Sir For this !!! nd lots of Love!! ❤💘💘
@guptasagar6949 ай бұрын
Same Here..I got confidence now after seeing his series
@sukhendubanerjee5082 Жыл бұрын
Sir thank you for creating such a beautiful javascript playlist,one more request sir please create more projects on it so that we can gain confidence in js. Love from West Bengal ❤
@santoshshrivastava65314 ай бұрын
Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.
@SarveshKumar-0811 ай бұрын
00:03 Learning hooks and projects helps in understanding concepts 01:55 Create a project called counter using React . 06:05 Creating a counter and updating its value on button click 08:09 Adding values to the browser console and updating the counter 12:27 React provides hooks for updating data in a controlled manner. 14:34 Hooks are essential for code updation and debugging 18:18 The variable counter can be automatically updated in the UI using React. 19:56 Understanding how to update a counter variable 23:28 Understanding the use of hooks and project 25:25 Learn about hooks in React and how they are used
@nirmal03 Жыл бұрын
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
@pareshkamaliya2493 Жыл бұрын
Absolutely incredible! Your ability to simplify explanations is truly amazing. I have decided to follow this entire series of react JS from you and intending to not just passively watch, but actively engage and practice every step. The accessibility of learning material in such a user-friendly manner is genuinely refreshing. A big thank you for that! Eagerly looking forward to the release of more tutorials. Keep up the fantastic work! 🚀
@dishajaiswal47835 ай бұрын
12:30 han smjh gye smjh gye, react bhot hi reactive hai... you explained hooks in such a simple way as a cup of tea... thankyou
@alone_boy_0103 ай бұрын
sir easy way me kiya hu let [counter, changecounter] = useState(15); let increase = ()=>{ if(counter { if(counter>0){ changecounter(counter-1) } };
@crickettecnology97172 ай бұрын
const [count, setCount] = useState(0); const handleButton = () => { let value = count + 1; if (value { let dec = count - 1; if (dec>=0) { setCount(dec); } }; Bro listen sir ne bola tha value 20 tak aani chahiye apke code me value 19 tak aayegi so =0 karna wha par ☺
@Hafijur0211 Жыл бұрын
"Thanks for being an awesome React teacher! Your teaching makes complex concepts seem so much simpler. Your clear explanations and relatable examples really help us understand and apply React effectively. Grateful for your patience and dedication in guiding us through this journey. Looking forward to building more cool things with React, all thanks to your great teaching!"
@abbas__00 Жыл бұрын
Sir hooks bahut hi confusion create kar Raha tha but you made it ❤..... please cover all hooks
@chaiaurcode Жыл бұрын
Projects me baaki apne aap cover ho jayenge
@abbas__00 Жыл бұрын
@@chaiaurcode ok sir thank you 😍
@ankushthakur21775 ай бұрын
Bhut maza aaya sir ji....pure knowledge Learning: React Control the UI React Says, do whatever you want, but i will control the UI for the App. So that if AnyValues changes i can update that in all the places wherever it is used
@iNeurons Жыл бұрын
गुरुदेव को प्रणाम 🙏🙏
@nirmallyakoner6005 Жыл бұрын
Assignment answer const addValue = () => { if(counter { if(counter>0 ){ counter = counter - 1 setCounter(counter) } console.log("Clicked",counter); } if I use greater than and equal to and put the increment statement outside the block then the initial value still changes and when I reach 20 on UI and still clicks on addvalue button then UI is not changing but the value is changing inside. when after clicking so much you click on removevalue then you see that your value starts from where you stop clicking and from there it will start decrasing.
I am 35 yrs old still not settled in life just started learning react Hitesh Sir you are a big hope for me
@zishanchaudhary221 Жыл бұрын
what were you doing!!
@mehedihassan-pf6yh2 ай бұрын
How you doing now
@funnyclipsofbgmijods4804 Жыл бұрын
@Everyone please comment on here. The reach is important for us to motivate sir to the highest and squeeze out the best number 1 content of React in hindi from Hitech sir.❤❤❤❤❤❤❤❤
@chaiaurcode Жыл бұрын
❤️❤️❤️
@tafizurrahman7342Ай бұрын
maza a agya sir class mene useState pora tha lakin a hooks ke ander ata hai a nhi bataya abhi concept clear ho gya sir thank you
@satyamkesherwani639624 күн бұрын
18 October 2024 1:00 AM
@Movies_series_anime_kdrama9 күн бұрын
01-11-2024 10:01 PM
@triloksaini59872 ай бұрын
Hooks in React Intro 0:00 Start 2:21 creating the project 2:30 UI updation with simple JS 8:00 Problem in UI updation with JS 10:50 Hooks in React intro 13:00 Hooks (useState) implementation 15:13 Assignment 26:11 Conclude 27:14 Thank you sir ji
@RajveerSingh-zg9vd3 ай бұрын
Your way of teaching is really unique and impressive .
@parasmore8994 ай бұрын
I have seen your chai aur backend series, and now referring this series, your teaching method is awesome sir, very helpful.
@jitendrarathod2307Ай бұрын
Sir aapne to hame java developer se javascript developer bana diya Ab react start kar diya . Unbeatable explanation.🙏🙌
@muheebpasha543Ай бұрын
Hooks provide a more powerful, flexible, and simpler way to build React components by introducing state and lifecycle features into functional components. why hooks are important: 1. State and Lifecycle in Functional Components: Before hooks, functional components were stateless and could not manage their own state or have access to lifecycle methods like componentDidMount. Hooks like useState and useEffect enable functional components to manage state and handle side effects. 2. Cleaner and More Reusable Code: Hooks allow developers to extract stateful logic from components and reuse it across different parts of the application without needing to rewrite code. Custom hooks enable better code organization and reusability. 3. Simplification of Class Components: Hooks eliminate the need for class components, which can sometimes be complex due to issues like this binding. Functional components with hooks tend to be easier to understand and maintain. 4. Improved Code Organization: Using hooks like useEffect, you can group related logic together, making the code more modular. It avoids scattering logic across lifecycle methods as it often happens in class components. 5. Encapsulation of Side Effects: With hooks like useEffect, React allows you to handle side effects (e.g., data fetching, subscriptions) in functional components in a declarative and controlled way, similar to lifecycle methods but more granular and easier to manage.
@harshitnayan29255 ай бұрын
Probably the best explanation of concepts I've seen on youtube.
@VineetSingh-qg5ztАй бұрын
"Wow, this video is incredible! The way you explained React hooks made everything so clear and easy to understand. Thank you for your hard work and for sharing your knowledge-this is definitely the best resource I've found on the topic! Keep up the great work!" Abhi tak sirf use kar rhe the samjh toh ab aaya h.... Why react...? Hitesh ji 🙏
@AjayKumar-x1o4w2 ай бұрын
After observing your teaching style, I want to say that, starting now, you’re my role model.
@mangalamsingh1050Ай бұрын
Best explanation of hooks available on yt👌.
@modestSounds3 ай бұрын
Thankyou sir.. aapse pdhke ek alg hi confidence ata hau schmeee
@DeepakSaini-w2g5 ай бұрын
Sir your all course is sach in a depth. Thank you for teaching us in depth. I have earned many things which I use in my projects.
@rakeshpavanramanujam95342 ай бұрын
22:44 was so hilarious 😂... Sir, you are also one of the best teachers I've ever come through who made learning a nice feeling...❤ Lot's of love to you Sir....
@xdcoder_xyz4 ай бұрын
Wow, itna smoothly smjhaya, pta hi nhi chla kab video khtm hone pe aagya
@TusharJaiswal-v2w4 ай бұрын
thanks sir for revealing this kind of teaching cause now we know what teaching really means when it comes to understanding of concepts and basics , you have setted standard that no one can stand none another than you..
@soumyasaxena774 ай бұрын
thankyou for making this topic so easy.. no one has taught hooks with such ease :)
truly auesome explanation after rushing through numerous tutorials of react finally I found the best one
@anupamkumari-j4h3 ай бұрын
Explained basic very intuitive way, any one novice or experience people can get it very easy.
@r060zeeshankhan9Ай бұрын
bohot top class explanation tha hitesh bhai...
@pranavprakash63334 ай бұрын
Your teaching is admirable, sir.
@RajSharma-cg7ve2 ай бұрын
Best React course and moreover it's free. Your explanations are to the point. I have completed your javascript series as well. Even after working with JS for over three years, I learned many things from there. Thanks, Hitesh sir.
@YashwaniVerma-q5s2 ай бұрын
Big fan sir, no one explains concepts like you. thankyou for the amazing content.
@SajjadAhmad-wf1by2 ай бұрын
samajh gaye sahab....your sepciality is explaining under the hood concepts in a very easy and interesting way.
@rashmi_t4 ай бұрын
Hitesh Sir , you are an excellent teacher. Your way of teaching is simple and clear. And your Smile 😊❤
@visheshgupta49902 ай бұрын
Interesting way to explain how you teach us about the cricket which we don't know and than code , loved it , I feel time laga lekin finally Hitesh Sir se react series padhni start kar hi di , Now I feel confident my foundation and everything will be improved at it's bet , Thanks again hitesh sir 🙌
Thank you so much sir. These are the type of videos I was searching for where one would explain the things going on under the hood and not only explain what thing it does but also tells why this thing was developed in the first place. 👍🙏
@KushPatel-d6h3 ай бұрын
This might be basic, but your way of explaining it is exceptional. Not everyone can break it down as clearly as you do @Hitesh
@solutionhere955Ай бұрын
26:37 Assignment Ans is - const addvalue = () => { if (counter{ if(counter!== 0){ setCounter(counter-1); }else{ counter=0; } }
@nileshshetty24964 ай бұрын
also when you create a new button lets say " increment +10 " and click on it it wont add the value 10 on the previous values of counter for example lets say you clicked counter 5 time so the counter has the value 5 in it but the moment you click on the +10 button it will start from 0 and set the new value to 10 in counter instead of 15, to solve this always target the previous value of the counter variable like so. const increment = ()=>{ setCount(prev => prev+1) } const increment5 = ()=>{ setCount(prev => prev+5) } const decrement = ()=>{ setCount(prev => prev-1) } in this way you will be targeting the previous value of the counter and wont add values from the start (0).
@arpit.develop4 ай бұрын
bro setCount(counter + 10) will work fine here just like for +1
@commandesktop4 ай бұрын
Your concept explanation is best, i can't stop smiling when i understand the concept behind ...
@nehakaler66775 ай бұрын
Finished this 5th lecture on 13 June. Started in the morning and going for more (absolutely loving it). Will update on every lecture after this.
@ShivBhaktSujeet3 ай бұрын
Ek Number Sir- ye comment apko motivate krne ke liye, aap motivate honge too hum bhi apse motivate honge. Thank you bhi itni aache se explain krne ke liye.
@tusharmore40825 ай бұрын
React is temporary but Hitesh sir explanations are permanent ..... Thanks Sir
@AmanKhan-wx5xo5 ай бұрын
You are the best teacher for react in the KZbin because you learn how to work in the industry level projects. Thank you so much sir for this amazing series 😊😊
@suprakashballav80572 ай бұрын
Nicely explained Sir, completed the assignment as well.
@bitsandbrainsАй бұрын
Thank You So much for teaching me in depth js and react for free of cost
@LotusNeft5 ай бұрын
12:35 you got my attention sir. The best react video. Thank you for your videos and support .
@vishalrohera43283 ай бұрын
if (counter < 20) { setcounter(counter + 1) } } const removeval = () => { if (counter > 0) { setcounter(counter - 1) } } Assignment completed sir 👍
@IrtizaAzam2 ай бұрын
Doing your course in 2024 September and it's totally okay.... fantastic...thank you❤
@dhavalprajapati97953 ай бұрын
Sir ji JS pe abb to Commmand aa gya hai bcz apka explain karne ka Method Jo hai. is liye Dil se thank you
@Rob_in_Malhotra5 ай бұрын
Hands Down, the best React series. The way things are explained, marvellous!
@wzsiddiqui2 ай бұрын
Very good scenario to start with. You are a good teacher.
@AazibAhsanАй бұрын
thanks brother for this course this is very helpful for me and my friends start learning react
@michealdas1984 ай бұрын
Sir, your explanation is really Good. I am enjoying watching your series
@SalmanMalik-w2x4 ай бұрын
The best thing about you is, {I know you are a Champ coder} but the beauty is you are far better Teacher than a Coder. This is a deadly combination brother | Sir | Mentor | Guru ji | ❤
@ujjwalssharma81494 күн бұрын
if(counter === 0) return ; so simple😁 btw amazing explanation sir 🧡
@HimanshuKumar-g6b7 күн бұрын
kamaal ka samjhaate ho aap Hitesh sir.......Thankyou..♥♥
@naumannasir69482 ай бұрын
I started learning react few months back from other resources where i get to know that useState is used to update value of a variable but now i am following hitesh bhai and came to know that actually why we use useState like whenever we have to tell our system to use the updated value of a state in UI therefore we use useState, now it has cleared my concept of useState in react.
@ahmad930993 ай бұрын
Hitesh sir teaching method is very different and very nice lectures 😇
@abdulmanan-jq4ot4 ай бұрын
React is temporary but Hitesh sir explanations are permanent thanks sir
@python-rocksАй бұрын
Thank you for such an amazing series! These videos are truly a gem!!
@umerientertainer3282 ай бұрын
Learning very first skill from this channel. Recommended by my friend Wish me good luck 🥰
@watchout-ov3cz5 ай бұрын
you are like a gps working for giving direction to new ones in this changing tech world
@harshgoyal40502 ай бұрын
Found you last month on X space I instantly knew that you are someone who is really passionate about coding and then came to your channel. Thanks for such wonderful videos and speaking so humbly while teaching.
@kuldeepsinghrathore4258Ай бұрын
React is temporary but Hitesh sir explanations are permanent 🎉 excellent work sir
@SaadZada-q9z3 ай бұрын
Sir ap bhtt acha phrty hnn....code with harry sy acha ap smjhty hn ...
@MayurPatel-y1e21 күн бұрын
Best react tutorial, Thank you Hitesh Sir.
@ScribbleSquad2341Ай бұрын
zabardast the whole concept is cleared by the project perfect and effective teaching
@AnUnintentionalDev4 ай бұрын
Kya analogy h yaar, Australia vs India and cricket, maza hi aa gya 1 hi toh dil h Hitesh sahab kitni baar jeetoge, jeeyo ap hazaar saal ❤🎉 #zabraExample
@ishitak54862 ай бұрын
i literally joined my hands in front of you after watching the video as if you are god to me sir i was struggling so much in these concepts and i was feeling way too depressed from the past week and thank you so much for such a great explanation (hats off to you sir
@gobindabarman83395 ай бұрын
Apka samjhane ka tarika achcha hain sir.. ❤❤
@gauravtejpal89013 ай бұрын
As a teacher, being friendly and kind are indispensable qualities