Комментарии:
thanks
ОтветитьThank you so much, Sir.
Ответитьglad im here
Ответитьcfbr
Ответитьgood course
ОтветитьYou are my inspiration, ideal.
ОтветитьThank you so much sir❤❤❤
Ответитьcfbr
Ответитьmaza aaya
ОтветитьMazaaa aagya Sir.....Pair chhukar pranaam aapko 🙌🙌
Ответитьthere is no need for asking only 500 comment this playlist deserve more than a million like and 100k comment
ОтветитьTo prevent remove value after 0 : onClick={() => count !=0 ? setCount((count) =>count-1):setCount(count)}
To prevent add value after 20: onClick={() => count!=20? setCount((count) => count + 1):setCount(count)}
People enjoying (watching Netfix ). Here I am , watching your playlist (after falling in love with your user friendly explanations.)
ОтветитьIt is good for understanding hooks with project
Ответить❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣❣
ОтветитьSir , You should teach how to teach .
love the way you teach everything ❤❤❤❤❤❤
Thank you Sir
Ответить❤💙💛
ОтветитьThe best
ОтветитьAssignment:
const addValue = () => {
if (counter <= 19) {
console.log("clicked", counter);
setCounter(counter + 1);
} else {
console.log("Counter value exceeds 20");
}
};
const removeValue = () =>{
if (counter >=1){
console.log("clicked", counter);
setCounter(counter - 1)
}
else {
console.log("Counter value should not be less than 0");
}
};
Assignment Solution
const increaseCounter = () => {
if(counter <= 19) {
setCounter(counter + 1);
}
}
const decreaseCounter = () => {
if(counter > 0) {
setCounter(counter - 1);
}
}
Thanks
Ответитьgood video
Ответитьchai aur react
Ответитьmaza araha hai sir, thanks a ton for such calm ed. videos
ОтветитьGreen tea
Ответитьhere are working code
let [counter, setCounter] = useState(15)
// let counter = 15
const addValue = () => {
// counter = counter + 1;
// setCounter(counter + 1)
if(counter != 20){
setCounter(counter + 1)
}else{
setCounter(counter - 1)
}
}
const removeValue = () => {
// setCounter(counter - 1);
if (counter != 0) {
setCounter(counter - 1)
}else{
setCounter(counter + 1)
}
}
thnkss
Ответитьgot the concept thank u for explaining in such easy manner
ОтветитьAwesome course bhaiya. I've recommended it to my friends. Also, can you please name that paid company plugin?
Ответитьcricket
Ответитьaustralia
ОтветитьSir sab samagh aa raha hai
ОтветитьThank you sir
Good learning
Bangladesh
Ответитьconst addValue =() => {
counter =counter+1
if(counter >= 20 ){
counter =20
alert("You have reached Max")
}
setCounter(counter)
}
const removeValue =() => {
counter =counter-1
if(counter <= 0 ){
counter =0
alert("You have reached Min")
}
setCounter(counter)
}
australia
Ответитьaustralia ki mkc
ОтветитьBEst Of LUcK.
Ответитьexample sahi tha bro
ОтветитьSir ne target 1000 se 500 kiya, hmne comments 1000 se 2000 kar diiye😂😂😂😂💪💪💪💪
ОтветитьSmj bhi ara hai aur maja bhi ara hai
ОтветитьZero to hero😂😂😂
ОтветитьThanks bro
Ответитьimport { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
function App() {
const [counter,setCounter]=useState(10)
const addValue=()=> {
if(counter<20)
setCounter(counter+1)
}
const removeValue= ()=> {
if(counter>0)
setCounter(counter-1)
}
return (
<>
<h1>Chai and learning React</h1>
<h3>counter Value:{counter}</h3>
<button
onClick={addValue}
>AddValue</button>
<br/>
<button
onClick={removeValue}
>RemoveValue</button>
</>
)
}
export default App
Rohit Sharma Pull Shot
Ответить