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.
@dharmeshtanwar2185 ай бұрын
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?
@akshaychavhan9551 Жыл бұрын
thats right
@navodithmondal48614 ай бұрын
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
@TechAsad10 ай бұрын
if(Counter==0){ SetCounter(0) }
@deveshsharma53410 ай бұрын
hn tabhi error show kr rha h kuki dimag hi nhi lgaya
@ayushpanchal20538 ай бұрын
itna chhota assignment?
@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......
@kritarthapatowary728910 ай бұрын
This comment needs to be at top.
@g.guruprasad23157 ай бұрын
Bro Really thank you bro, I am breaking my head since last 3 days why it not updating same value.. Really thanks Man
@g.guruprasad23157 ай бұрын
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.guruprasad23157 ай бұрын
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
@godkillyt71456 ай бұрын
@@g.guruprasad2315 bro remove setCount((count)) and await your code will run properly and I don't think await works in console.log
@decent71910 ай бұрын
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.
@jagadishpundir41253 ай бұрын
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"); } };
@sagarsen15759 ай бұрын
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) } }
@vishnubdh72887 ай бұрын
same here
@ajitrai93175 ай бұрын
alert("Limit exceed") ek number bhai
@SarveshKumar-08 Жыл бұрын
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
@muhammadhilal5807 Жыл бұрын
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 :)
@SAURABHKUMAR-dr9ub3 ай бұрын
"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.
@kinlearn6 ай бұрын
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.. 🙌
@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.
@santoshshrivastava65315 ай бұрын
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.
@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
@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!! ❤💘💘
@guptasagar69410 ай бұрын
Same Here..I got confidence now after seeing his series
@triloksaini59873 ай бұрын
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
@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 ❤
@nirmal03 Жыл бұрын
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
@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!"
@jitendrarathod23073 ай бұрын
Sir aapne to hame java developer se javascript developer bana diya Ab react start kar diya . Unbeatable explanation.🙏🙌
@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 😍
@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.
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! 🚀
@iNeurons Жыл бұрын
गुरुदेव को प्रणाम 🙏🙏
@alone_boy_0105 ай бұрын
sir easy way me kiya hu let [counter, changecounter] = useState(15); let increase = ()=>{ if(counter { if(counter>0){ changecounter(counter-1) } };
@crickettecnology97173 ай бұрын
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 ☺
@anilkumarnayakk2235 Жыл бұрын
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-pf6yh4 ай бұрын
How you doing now
@muheebpasha5433 ай бұрын
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.
@CandleLight-Shorts Жыл бұрын
Assignment 1 sol: -> import { useState } from "react"; function App() { let [counter, setCounter] = useState(0); function increment() { setCounter((p) => { return p < 20 ? p + 1 : p; }); } function decrement() { setCounter((p) => { return p > 0 ? p - 1 : p; }); } return ( {counter} increment decrement ); } export default App;
Sir aapka hook wala example sun ke maza aa gaya mereko bhi har baar Hooks sun ke Hook pull yaad aata😅
@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 Жыл бұрын
❤️❤️❤️
@AdityaMehta-v9x2 ай бұрын
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 .
@satyamkesherwani63962 ай бұрын
18 October 2024 1:00 AM
@Movies_series_anime_kdramaАй бұрын
01-11-2024 10:01 PM
@akshaykumar192Ай бұрын
18 november 2024 1:00am
@codingJesus000125 күн бұрын
who are watching it in 2025
@nayangupta670222 күн бұрын
Tu future se aaya h ky
@codingJesus000121 күн бұрын
@nayangupta6702 😂😂
@nileshpandit85482 күн бұрын
Me
@DipuManojSingh10 сағат бұрын
I don't
@rishabhchoudhary293611 күн бұрын
the way you explain the concepts and how those work behind the scenes is truly amazing. thank you so much sir
@EngineerAnsh6 ай бұрын
00:03 Learning hooks and projects helps in understanding concepts 01:55 Create a project called Zero Tu Counter using React in TypeScript. 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
@tafizurrahman73422 ай бұрын
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
@AjayKumar-x1o4w3 ай бұрын
After observing your teaching style, I want to say that, starting now, you’re my role model.
@vishalrohera43284 ай бұрын
if (counter < 20) { setcounter(counter + 1) } } const removeval = () => { if (counter > 0) { setcounter(counter - 1) } } Assignment completed sir 👍
@RajveerSingh-zg9vd4 ай бұрын
Your way of teaching is really unique and impressive .
@SalmanMalik-w2x5 ай бұрын
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 | ❤
@naumannasir69484 ай бұрын
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.
@VineetSingh-qg5zt2 ай бұрын
"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 🙏
@visheshgupta49903 ай бұрын
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 🙌
@RajSharma-cg7ve4 ай бұрын
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.
@diptangshuray35284 ай бұрын
truly auesome explanation after rushing through numerous tutorials of react finally I found the best one
@Aachal25618 күн бұрын
Finally Hooks implementation done ✅ Thanks sir !
@KushPatel-d6h4 ай бұрын
This might be basic, but your way of explaining it is exceptional. Not everyone can break it down as clearly as you do @Hitesh
@redzonegaming130519 күн бұрын
Kehne ke liye basss ❤❤❤❤❤❤ itna hai bhai ek number course banaya hai me dusre 2 course dekhe hai par sare doubt solved here thank you so much ❤❤❤
@IrtizaAzam3 ай бұрын
Doing your course in 2024 September and it's totally okay.... fantastic...thank you❤
@SajjadAhmad-wf1by3 ай бұрын
samajh gaye sahab....your sepciality is explaining under the hood concepts in a very easy and interesting way.
@TusharJaiswal-v2w6 ай бұрын
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..
@harshgoyal40504 ай бұрын
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.
@anupamkumari-j4h4 ай бұрын
Explained basic very intuitive way, any one novice or experience people can get it very easy.
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....
thankyou for making this topic so easy.. no one has taught hooks with such ease :)
@ShivBhaktSujeet4 ай бұрын
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.
@YashwaniVerma-q5s3 ай бұрын
Big fan sir, no one explains concepts like you. thankyou for the amazing content.
@pratyushkottawar27153 ай бұрын
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. 👍🙏
@r060zeeshankhan93 ай бұрын
bohot top class explanation tha hitesh bhai...
@kuldeepsinghrathore42582 ай бұрын
React is temporary but Hitesh sir explanations are permanent 🎉 excellent work sir
@bitsandbrains2 ай бұрын
Thank You So much for teaching me in depth js and react for free of cost
@commandesktop6 ай бұрын
Your concept explanation is best, i can't stop smiling when i understand the concept behind ...
React is temporary but Hitesh sir explanations are permanent thanks sir
@ujjwalssharma8149Ай бұрын
if(counter === 0) return ; so simple😁 btw amazing explanation sir 🧡
@ahmad930995 ай бұрын
Hitesh sir teaching method is very different and very nice lectures 😇
@dineshshinde211624 күн бұрын
**Grasp Things **- 1. hooks - Hooks are nothing but the functions that allows you to use the state, life cycle methods and other react features in the functional components const [count, setCount]=usestate(0); now, the **count** is just like the variable and the rightside of the array is the current value of it and **setCount** is the method to update it. 2. Answer - let addValue = () => { setCounter((prevCounter) => { return Math.min(prevCounter + 1, 20); }); if (counter == 20) { alert("hey it's the last"); } }; let removeValue = () => { setCounter((prevCounter) => { return Math.max(prevCounter - 1, 0); }); if (counter == 0) { alert("hey it's the last"); } };
@ishitak54864 ай бұрын
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
@HarshvardhanJha-m1t2 ай бұрын
Man I used counter++ while updating due to muscle memory but when I saw it not updating i remembered the logic behind counter++ which is first execute the current line of code then update anyway great video sir Learned many things today When I feel down watching your video gives me motivation keep up the good work
@AnUnintentionalDev5 ай бұрын
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
@suprakashballav80573 ай бұрын
Nicely explained Sir, completed the assignment as well.
@pranavprakash63336 ай бұрын
Your teaching is admirable, sir.
@wzsiddiqui4 ай бұрын
Very good scenario to start with. You are a good teacher.
@gauravtejpal89014 ай бұрын
As a teacher, being friendly and kind are indispensable qualities
@umerientertainer3283 ай бұрын
Learning very first skill from this channel. Recommended by my friend Wish me good luck 🥰
@HimanshuKumar-g6bАй бұрын
kamaal ka samjhaate ho aap Hitesh sir.......Thankyou..♥♥
@michealdas1985 ай бұрын
Sir, your explanation is really Good. I am enjoying watching your series
@ScribbleSquad23412 ай бұрын
zabardast the whole concept is cleared by the project perfect and effective teaching
@dhavalprajapati97955 ай бұрын
Sir ji JS pe abb to Commmand aa gya hai bcz apka explain karne ka Method Jo hai. is liye Dil se thank you
@MuhammadNouman-q2gАй бұрын
sir love from pakistaan love u sir .feeling happy to have teacher like u😘😘😘😘😘🥰
@AazibAhsan3 ай бұрын
thanks brother for this course this is very helpful for me and my friends start learning react
@devanshprajapati32895 ай бұрын
Your motivation is our motivation. There are no any videos like this channel. Thank you very much for giving us this much of knowledge with charcha😅😅
@patoliyahenish58503 ай бұрын
React is temporary but Hitesh sir explanations are permanent
7 күн бұрын
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
@modestSounds4 ай бұрын
Thankyou sir.. aapse pdhke ek alg hi confidence ata hau schmeee
@CodewithIk11774 ай бұрын
sir g is lecture mai boht maza aya and very deep expalantion wow i am from pakistan thank you sir G 😘😘
@RajShaw-h7x5 ай бұрын
Sir aapka hook wala example sun ke maza aa gaya mereko bhi har baar Hooks sun ke Hook pull yaad aata😄
@SaadZada-q9z4 ай бұрын
Sir ap bhtt acha phrty hnn....code with harry sy acha ap smjhty hn ...
@ManojSingh-b1j3i4 ай бұрын
Bilkul samjh aarha h guruji aap padao aur samjh naa aye aisa kaise ho sakte hai..💯
@shwetapipliya6 ай бұрын
nice vedio aap bahut simple way me samjhate ho 😊
@python-rocks3 ай бұрын
Thank you for such an amazing series! These videos are truly a gem!!
@foodiebuddy9995 ай бұрын
sir ji first time i have feel great after seeing such a great content, no buttering but i watched js playlist and started react and first time i subscribed any creators channel and commented a compliment to any creator very simple and on point explanation keep drinking chai and doing code 😊