} This is the whole solution ! Sir your teaching style is just extraordinary , so humble, so many clarity ! Thank you so much ❤❤❤❤❤❤❤❤❤❤❤❤❤❤👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
// 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
"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 !!
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......
{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
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...❤
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) } }
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"); }
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.. 🙌
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.
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. ❣❣❣❣
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.
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
I have Completed My React series From some other TH-cam 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!! ❤💘💘
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
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 ❤
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
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.
"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!"
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! 🚀
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 ☺
"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 🙏
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.
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.
@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.❤❤❤❤❤❤❤❤
the enthusiasm that hitesh sir have while teaching is on the next level, literally no one can beat the pedagogy of sir and how in-depth sir goes inn ever topic is on a different level, thank you hitesh sir for creating this series
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.
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.
**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"); } };
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 🙌
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
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.
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. 👍🙏
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
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....
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 😊
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 ❤❤❤❤❤❤❤❤❤❤❤❤❤❤👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
const addValue = () => {
console.log("clicked", counter);
if (counter < 20) {
setCounter(counter + 1);
}
};
const removeValue = () => {
console.log("clicked", counter);
if (counter >= 1) {
setCounter(counter - 1);
}
};
const addcnt = () =>{
if(counter < 20){
setcount(counter + 1)
}
}
const remcnt = () =>{
if(counter > 0){
setcount(counter - 1)
}
}
benefits of being lazy 😅
@@foodiebuddy999
const decrement = () => {
count {
count>=20 ? count == 20 : setCount(count+1);
}
Working good job ✅
function App() {
const [counter, setCounter] = useState(0)
const increment = () =>{
if (counter < 20) {
setCounter(counter + 1)
}
}
const decrement = () => {
if (counter > 0) {
setCounter(counter - 1)
}
}
return (
Chai aur React
Counter value: {counter}
Increment
Decrement
)
}
export default App
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.
Thankyou bhai for all such details
// 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
if(Counter==0){
SetCounter(0)
}
hn tabhi error show kr rha h kuki dimag hi nhi lgaya
itna chhota assignment?
"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 !!
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......
This comment needs to be at top.
Bro Really thank you bro, I am breaking my head since last 3 days why it not updating same value..
Really thanks Man
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
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
@@g.guruprasad2315 bro remove setCount((count)) and await your code will run properly and I don't think await works in console.log
React is temporary but Hitesh sir explanations are permanent 🎉
😍
Absolutely right
Baap of coding channel in youtube. ("Thanks");
Why temporary?
thats right
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...❤
const addCount = () => {
if(count {
if(count>0)
setCount(count - 1)
}
Crystal clear explaination. Love you Hitesh sir. ❤❤❤❤
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.
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)
}
}
same here
alert("Limit exceed") ek number bhai
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 :)
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");
}
};
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.. 🙌
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.
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. ❣❣❣❣
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.
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
I have Completed My React series From some other TH-cam 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!!
❤💘💘
Same Here..I got confidence now after seeing his series
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
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 ❤
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
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.
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 .
"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!"
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! 🚀
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
Sir aapne to hame java developer se javascript developer bana diya Ab react start kar diya . Unbeatable explanation.🙏🙌
Sir hooks bahut hi confusion create kar Raha tha but you made it ❤..... please cover all hooks
Projects me baaki apne aap cover ho jayenge
@@chaiaurcode ok sir thank you 😍
sir easy way me kiya hu
let [counter, changecounter] = useState(15);
let increase = ()=>{
if(counter {
if(counter>0){
changecounter(counter-1)
}
};
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 ☺
गुरुदेव को प्रणाम 🙏🙏
"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 🙏
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.
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.
const addNumber = () => {
if(count {
if(count>=1){
setCount(count - 1)
}
}
rather goo like this `const addValue = () => {
ctr = ctr + 1
if(ctr
const addValue = ()=> {
if(counter !== 20) {
setCounter(counter + 1);
} else {
counter = 20;
}
}
const removeValue = ()=> {
if(counter !== 0) {
setCounter(counter - 1);
} else {
counter = 0;
}
}
let [counter,setCounter] = useState(0);
let addValue = () => {
console.log("Value Added",counter);
setCounter(counter++);
}
let removeValue = () =>
{
console.log("Value Removed",counter);
if(counter !== 0)
{setCounter(counter- -);}
else
{setCounter(0)}
}
Sir aapka hook wala example sun ke maza aa gaya
mereko bhi har baar Hooks sun ke Hook pull yaad aata😅
who are watching it in 2025
Tu future se aaya h ky
@nayangupta6702 😂😂
Me
I don't
Mee
the way you explain the concepts and how those work behind the scenes is truly amazing. thank you so much sir
I am 35 yrs old still not settled in life just started learning react Hitesh Sir you are a big hope for me
what were you doing!!
How you doing now
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;
const [count, setCount] = useState(0)
const addValue = () => {
setCount(count + 1)
}
const decValue = () => {
setCount(Math.max(0, count - 1))
}
@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.❤❤❤❤❤❤❤❤
❤️❤️❤️
After observing your teaching style, I want to say that, starting now, you’re my role model.
18 October 2024 1:00 AM
01-11-2024 10:01 PM
18 november 2024 1:00am
the enthusiasm that hitesh sir have while teaching is on the next level, literally no one can beat the pedagogy of sir and how in-depth sir goes inn ever topic is on a different level, thank you hitesh sir for creating this series
been trying to learn this concept for soo long pr 1st time itne clearly samajh aaya
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.
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 ❤❤❤
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.
This might be basic, but your way of explaining it is exceptional. Not everyone can break it down as clearly as you do @Hitesh
This is one of the most beautiful introduction of hook ❤❤
mashallaha god bless you sir big fan from pakistan just started javascript by watching you're series and now thnx to god on react amazing sir
truly auesome explanation after rushing through numerous tutorials of react finally I found the best one
let [counter, setCounter] = useState(15)
const addValue = () => {
if(counter>=20)
setCounter(counter)
else
setCounter(counter + 1)
}
const removeValue = () => {
if(counter
Your Explanation is making easy to understand the concept.
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
Sir, bas mujhe sirf aapke hi lectures samajh aate hain. Thank God ke aap TH-cam par padhate hain! 😖
Your way of teaching is really unique and impressive .
Hitesh has saved careers of several Tier 3 college students,thanks alot sir
**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");
}
};
Best explanation of hooks available on yt👌.
samajh gaye sahab....your sepciality is explaining under the hood concepts in a very easy and interesting way.
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 🙌
Big fan sir, no one explains concepts like you.
thankyou for the amazing content.
if (counter < 20) {
setcounter(counter + 1)
}
}
const removeval = () => {
if (counter > 0) {
setcounter(counter - 1)
}
}
Assignment completed sir 👍
bohot top class explanation tha hitesh bhai...
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
yaar aa mans ketlu jordar bhanave mai koi divas natu vichariyu ke coding aatlu easy, interesting and funny bi hoi sake che !!! ❤❤❤
Explained basic very intuitive way, any one novice or experience people can get it very easy.
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.
Finally Hooks implementation done ✅ Thanks 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. 👍🙏
As a teacher, being friendly and kind are indispensable qualities
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
Doing your course in 2024 September and it's totally okay.... fantastic...thank you❤
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....
Thank you for such an amazing series! These videos are truly a gem!!
kamaal ka samjhaate ho aap Hitesh sir.......Thankyou..♥♥
Thank You So much for teaching me in depth js and react for free of cost
Learning very first skill from this channel. Recommended by my friend
Wish me good luck 🥰
sir sama bandh dia, kya padhaya ha.....already placed but jo sikne ko mila ekdum clearity.
thankyou so much sir kyonki mujhe aapse padhkar confidence aata hai.
Nicely explained Sir, completed the assignment as well.
Very good scenario to start with. You are a good teacher.
Simple logic for assignment
const addValue = () =>{
if(count===20) return;
setCount(count+1);
console.log(count);
}
const removeValue = () =>{
if(count===0) return;
setCount(count-1);
console.log(count);
}
if(counter === 0) return ; so simple😁
btw amazing explanation sir 🧡
Thankyou sir.. aapse pdhke ek alg hi confidence ata hau schmeee
Sir ap bhtt acha phrty hnn....code with harry sy acha ap smjhty hn ...
React is temporary but Hitesh sir explanations are permanent 🎉
excellent work sir
Teaching skills level 💯❤❤
26:15 Assignment
const addValue = () => {
if(count < 20) setCount(count + 1);
}
const removeValue = () => {
if(count > 0) setCount(count - 1);
}
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 😊
zabardast
the whole concept is cleared by the project perfect and effective teaching
one of my favorite instructor, for real
React is temporary but Hitesh sir explanations are permanent
thanks brother for this course this is very helpful for me and my friends start learning react
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
Not even the paid courses can match the level of your course and way of teaching.
Bilkul samjh aarha h guruji aap padao aur samjh naa aye aisa kaise ho sakte hai..💯
sir love from pakistaan love u sir .feeling happy to have teacher like u😘😘😘😘😘🥰
Best react tutorial, Thank you Hitesh Sir.
Such a nice way to expalin the react 💯
function increment(){
if(value>=20) return;
value += 1;
setValue(value);}
function decrement(){
if(value