React Challenge #8: Incrementing and Decrementing the State Variable on Button clicked in React JS

  Рет қаралды 98,696

Thapa Technical

Thapa Technical

Күн бұрын

Welcome, to ReactjJS Challenge in Hindi. We will see how to Incrementing and Decrementing the State Variable on Button clicked in React JS in Hindi in 2020.
************ Must Watch Videos For Web Development ************
➡️ Hooks in React JS in Hindi | useState in Hook in React JS: • #30: Hooks in React J...
➡️ Array Destructuring in ES6 in JavaScript in Hindi 2020: • ES6 Tutorial #5: Array...
➡️ Object Destructuring in ES6 in JavaScript in Hindi: • ES6 Tutorial #7: Objec...
➡️ React DevTools & Source Code Link: www.thapatechn...
➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: • React JS Tutorial in H...
➡️ ReactJS JavaScript Array Map Method in Hindi with Example: • ReactJS JavaScript Arr...
➡️ Fat Arrow Function in JavaScript in Hindi 2020: • ES6 Tutorial #8: Fat A...
➡️ #23: Array in React JS in Hindi | React JS Project Netflix App #2 in Hindi in 2020
➡️ Array in JavaScript in Hindi: • JavaScript Tutorial in...
➡️ #22: React JS Project Netflix App Part #1 in Hindi in 2020: • #22: Props in React Js...

➡️ Install VS Code for ReactJS LINK: www.thapatechn...
➡️ Check Complete Reactjs in One video here 👇 • ReactJS For Beginners ...
➡️ HTML in One Video: • Learn HTML in One Vide...
➡️ CSS in One video: • Learn Complete CSS In ...
➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
➡️ JavaScript in One video: • JavaScript in One Vide...
➡️ ECMAScript 6 in One Video: • ES5 & ES6 | ECMAScript...
➡️ HTML5 in one video: • HTML5 Tutorial in One ...
➡️ CSS3 in one video: • Learn Complete CSS3 In...
➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
➡️ Jquery in One video: • jQuery in One Video in...
➡️ JSON in one video: • JSON in One Video in H...
➡️ ReactJS in one video: • ReactJS For Beginners ...
➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
➡️ NodeJS in one video: / ipnwakoibt
➡️ MySQL in one video: • Complete SQL & MySQL i...
********** CLICK HERE TO WATCH ************
➡️ Fetch API in JavaScript: • Fetch API in JavaScrip...
➡️ AJAX tutorial for beginners in Hindi: • AJAX tutorial for begi...
➡️ Template literals (Template strings) in ES6 in JavaScript in Hindi: • ES6 Tutorial #3: Templ...
➡️ Async Await in JavaScript in Hindi: • Async Await in JavaScr...
➡️ Promises in JavaScript in Hindi: • Master The Promises in...
➡️ Callback Hell in JavaScript: • Callback Hell in JavaS...
➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
➡️ Source Code Link: www.thapatechn...
➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
➡️Plz show some love to My Siter KZbin Channel and Plz Subscribe Link: / @mayabeautyvlogs878
**************** MUST WATCH VIDEOS *****************
➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
➡️ How To Become a Web Developer 2020: • How To Become a Web De...
➡️ How JavaScript Works: • How JavaScript Works i...
➡️ Follow me on Instagram: / vinodthapa55
Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
➡️ Link: • Make Website Responsiv...
Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
Don't Forget to Follow me on all Social Network,
Website Link: www.thapatechn...
Instagram Link: / vinodthapa55
Facebook Link: / vinodthapa55
Twitter Link: / vb55thapa
Facebook ThapaTechnical Page Link: www.facebook.c...

Пікірлер: 104
@ThapaTechnical
@ThapaTechnical 4 жыл бұрын
Guys, ye video kaisa laga jarror batana ☺️
@tasneemkhan1405
@tasneemkhan1405 4 жыл бұрын
Ek no. sirji☝️ hamesha ki tarah super ke upar 🤞💖 Keep sharing awesome react lecture 🙏😍 Sir I missed some videos😥 I'll cover that soon and koi doubt Raha to please answer karna 🤗
@AsifAli14280
@AsifAli14280 4 жыл бұрын
Present sir😃
@ruchiagarwal4943
@ruchiagarwal4943 4 жыл бұрын
bhai kuch samajh nahi aa raha
@anishsingh293
@anishsingh293 4 жыл бұрын
sir aapka video dekh dekh ke job lg gya
@kamleshpawar9483
@kamleshpawar9483 3 жыл бұрын
as usual, awesome
@sohelansari5403
@sohelansari5403 Жыл бұрын
bhai maza aa gaya aaj bana liya ye mini project without any external help mujhe mere ek friend ne aapka channel recommend kiya tha aur sach me ye bohot acha suggestion tha thank you very much keep it up bro good work well done
@taruntanmay9431
@taruntanmay9431 3 жыл бұрын
I've started watching your videos at 2x-3x, using the Video Speed Controller plugin and reached to 45 video within a week. Since I also code everything simultaneously while learning from You so it took me a week. You teach the concepts so good, that when I paused the video to complete the challenge myself, I did everything expected. Amazing tutorials, and very easy to learn and remember all the concepts.
@tanmaythaker2905
@tanmaythaker2905 3 жыл бұрын
Same bro! I reached 47th video of the playlist in just 4. days
@taruntanmay9431
@taruntanmay9431 3 жыл бұрын
@@tanmaythaker2905 great ! I'm either on 60 or 70 now
@hammadshoaib7758
@hammadshoaib7758 2 жыл бұрын
bro what are you doing now?
@M0hiit
@M0hiit Жыл бұрын
@@hammadshoaib7758 lol
@zehrxsyed
@zehrxsyed 3 жыл бұрын
iske baad ache se samjh aaya kaafi kuch sir thank you.
@shivanigoswami7517
@shivanigoswami7517 4 жыл бұрын
Best channel on KZbin pls make a complete website project on react and how can deploy it
@RITIKJAINBCE
@RITIKJAINBCE 3 жыл бұрын
u can easily deploy it on github
@PrakashYadav-ur8or
@PrakashYadav-ur8or Жыл бұрын
Sir, Haar manane walo ki kabhi jeet nhi hoti btw you are doing wonderful job
@SauravVerma7
@SauravVerma7 Ай бұрын
Thank you ,brother! This was smooth!
@ShaibiLife
@ShaibiLife 11 ай бұрын
*Here you go for css* *{ padding: 0; margin: 0; box-sizing: border-box; background-color: aquamarine; } .main_div{ width: 100%; height: 100vh; background-color: goldenrod; display: flex; justify-content: center; align-items: center; text-align: center; } .center_div{ width: 25%; height: 60vh; background-color: aliceblue; box-shadow: 5px 5px 5px -5px black; border-radius: 15px; display: flex; flex-direction: flex; justify-content: center; align-items: center; } h1{ color: white; background-color: rgb(59, 58, 58); padding: 6px 0 2px 0 ; margin-bottom: 10px; width: 100%; box-shadow: 5px 5px 5px -5px black; } button{ min-height: 40px; border-radius: 5%; background-color: transparent; background-color: rgb(73, 70, 70); color: white; padding: 0 15px; margin-top: 30px; box-shadow: 5px 5px 5px -5px black; } button:hover{ background-color: rgb(83, 83, 228); } .btn_div{ width: 100%; display: flex; justify-content: space-around; align-items: center; }
@Kidsimproving-jv7zf
@Kidsimproving-jv7zf 2 жыл бұрын
thank you , you are solve my problems . i impressed your style of teaching.
@bhagabatiprasad2612
@bhagabatiprasad2612 4 жыл бұрын
Thank you bro. I did it myself . Also got an ide aof Shopping cart system. You're really Amazing...
@GG_Gaming_102
@GG_Gaming_102 3 жыл бұрын
Bro me toh fan hogya aapka what a explanation. 😙🙂☺
@letsshowdesigns
@letsshowdesigns 4 жыл бұрын
Kindly, make small website like one page in react and most important don't forget to cover redux which is very important hope you consider my request thank you.
@nitink7426
@nitink7426 4 жыл бұрын
Sir, everything is awesome but one thing you missed. at 2:24 Its not "Har manane walo ki kabhi haar nai hoti". Is it "Kosis karne walon ki kabhi haar nai hoti"
@Shoaib_Khan9272
@Shoaib_Khan9272 9 ай бұрын
yeah I was about to comment that
@rajat-s-kale1771
@rajat-s-kale1771 Жыл бұрын
Your teaching is awesome
@DEEPANSHU_NAG
@DEEPANSHU_NAG 4 жыл бұрын
*_Good UI_* 👍🏻 *_Nice thumbnail_* ✌🏻 *_Awesome video_* 👏🏻💯
@ThapaTechnical
@ThapaTechnical 4 жыл бұрын
Thank you so much ☺️
@abcool0801
@abcool0801 4 жыл бұрын
Amazing series bro bs ab state management b le aao jaldi se. how to use redux and other frameworks for react like gatsby ya nextjs
@anmolsingh4969
@anmolsingh4969 3 жыл бұрын
I complete it without vedio 😃😃😃👍👍👍
@ashishsingla4697
@ashishsingla4697 3 жыл бұрын
2:21 what an amazing quote ..
@hiralalumeshkumhar1054
@hiralalumeshkumhar1054 2 жыл бұрын
😂😂I am laughing at that quote
@sharyarmustafa9880
@sharyarmustafa9880 Жыл бұрын
import React, { useState } from 'react' function ButtonChange() { const [ count , setcount]=useState(0) if(count == -1){ setcount(0) } return ( {count} {setcount(count + 1)}} >+ {setcount(count - 1)}} >- )} export default ButtonChange
@sagar-vispute
@sagar-vispute 3 жыл бұрын
Bhai puri series functional component base hi he kya?
@gabbarpatil3222
@gabbarpatil3222 3 жыл бұрын
challenge accepted .... code with no design import React, { useState } from 'react' const App = () => { const [num, changeNum] = useState(0); const incrementNum = () => { changeNum(num+1) } const decrementNum = () => { if (num-1 < 0){ alert(`you can't decrease than 0`) }else{ changeNum(num-1) } } return ( {num} Increment Decrement ) } export default App
@vrajpatel0218
@vrajpatel0218 Жыл бұрын
sir ho gaya first time me
@mastikipathshala836
@mastikipathshala836 3 жыл бұрын
I Done this Challenge 😀
@okeyshourovroy2769
@okeyshourovroy2769 4 жыл бұрын
Very useful video brother
@soniyachaniya1674
@soniyachaniya1674 5 ай бұрын
Thank u so much 😊
@cb350_
@cb350_ 2 жыл бұрын
This was really helpful today :)
@sanketkpatil1683
@sanketkpatil1683 2 жыл бұрын
Thank you...... Really helpful
@shivamchouhan5077
@shivamchouhan5077 4 жыл бұрын
Thank you so much 😀😀
@RITIKJAINBCE
@RITIKJAINBCE 3 жыл бұрын
can simplify it more by passing button id to only one func. and inc or dec by checking the id
@sheikhs4896
@sheikhs4896 3 жыл бұрын
actually main is topic par video khoj raha tha on google i can't find it but actually you do so
@santiagopizzi2374
@santiagopizzi2374 3 жыл бұрын
Capo total, el unico que me pudo explicar lo que queria, saludos desde Argentina!
@piyush_dolar
@piyush_dolar 4 жыл бұрын
Why we do use cosnt everytime *const TodoList = () => {* *// Code goes here* *}* Why we don't use just let *let TodoList = () => {* *// Code goes here* *}* instead? just wondering.
@sumanjha7590
@sumanjha7590 4 жыл бұрын
because const means constant value it can't be change whereas in let we can update the value in need.
@sailendrachettri8521
@sailendrachettri8521 3 жыл бұрын
This is really fun :)
@EWorldHub
@EWorldHub 4 жыл бұрын
Superb
@dibyenduroy3149
@dibyenduroy3149 3 жыл бұрын
@thapa sir which project will be better to do in React/react so that i can get a job in software companies on experience basis.
@mozibulrahman188
@mozibulrahman188 4 жыл бұрын
Nce video bro..God bless u
@MS-bi2ls
@MS-bi2ls 2 жыл бұрын
really helpful
@karankhullar7934
@karankhullar7934 9 ай бұрын
I have done it like this, can anyone tell is it correct way to do ? import { useState } from "react"; function App() { let [number, setNumber] = useState("0"); function setValue(event) { let name = event.target.name; if (name === "dec") { if (number > 0) { setNumber(--number); } else { alert("Number can't be less than 0."); } } else { setNumber(++number); } } return ( {number} Increment Decrement ); } export default App;
@vaibhavsarode2426
@vaibhavsarode2426 4 жыл бұрын
i have completed this challenge
@rajbannasa7662
@rajbannasa7662 3 жыл бұрын
thank you so much sir
@manishjain9703
@manishjain9703 2 ай бұрын
I used this this is working but can't show alert setNum((preValue)=>{ return preValue === 0 ? 0 : num-1 })
@thecoderraj3777
@thecoderraj3777 3 жыл бұрын
Thanks sir ☺️
@Rohitvermawebdesigner
@Rohitvermawebdesigner 2 жыл бұрын
Hi Sir this is working fine only for single box but how can do this if we have multiple box with decrement and increment buttons?
@latikajain9309
@latikajain9309 4 жыл бұрын
hay can you please start the database thngs with react
@himanshudixit977
@himanshudixit977 3 жыл бұрын
9:31 actual logic
@harisbashir2719
@harisbashir2719 4 жыл бұрын
Please start flutter and dart cross platform mobile application series. Humble request from Pakistan♥️
@gauravsahu4917
@gauravsahu4917 3 жыл бұрын
THanks boss
@deepakborade4123
@deepakborade4123 Жыл бұрын
Very good
@mananbari4725
@mananbari4725 3 жыл бұрын
@Thapa_Technical Can you please make a video for Global state Context and Hooks plz let me now if you will or not
@hruday-ranjan
@hruday-ranjan 3 жыл бұрын
SUPPER BrO....👌
@aditya2000
@aditya2000 4 жыл бұрын
Nice challenge buddy
@dibyenduroy3149
@dibyenduroy3149 3 жыл бұрын
@Thapa sir aapke paas full course hoga "react + redux" ka ?? hy to please link bhej dijiye ,paid couse honese bhi chalega
@sumanjha7590
@sumanjha7590 4 жыл бұрын
what if we use (!num == 0) to decrement in If statement
@anmolsingh4969
@anmolsingh4969 3 жыл бұрын
IT depends on u
@vaghelapooja1690
@vaghelapooja1690 3 жыл бұрын
Isame ham spread operator ka use kar sakte hai kya ? Agar haa to kese?
@zakyasharmeen5815
@zakyasharmeen5815 6 ай бұрын
import React, { useState } from "react"; export default function Inc() { const [num, setNum] = useState(0); const increment = () => { setNum(num + 1); }; const decrement = () => { setNum(num - 1); }; if (num < 0) { return alert("number less than 0 is canot be decrease"); } return ( {num} + ▶ - ◀ ); } i did like this by own same output
@akashgupta3322
@akashgupta3322 Жыл бұрын
Mera sabse bardha problem ye ho rha he,ki me logick kese lgau mtlb thinking power ko kese boost karu
@rkcreation6560
@rkcreation6560 4 жыл бұрын
Done in first try
@kmkrishna762
@kmkrishna762 2 жыл бұрын
thanks
@niyomahor6252
@niyomahor6252 2 жыл бұрын
instead of (num + 1) , why can not we write (num++) . When I am writing (num++) it is not working.
@rajusinghrajput4442
@rajusinghrajput4442 4 жыл бұрын
Helo. Sir Mene apse puncha tha ki hm login with token form kese create kar sakte he par sir apne koi answer nhi diya sir muje is form ki bhut jarurat thi
@sufisufyan6489
@sufisufyan6489 4 жыл бұрын
zabardast
@NisarAhmad-lz8ur
@NisarAhmad-lz8ur 3 жыл бұрын
kindly redux py complete videos banado
@suyogtiwari3134
@suyogtiwari3134 4 жыл бұрын
Hello dai , are you from Nepal?
@ThapaTechnical
@ThapaTechnical 4 жыл бұрын
Yes
@rkgrap
@rkgrap 4 жыл бұрын
Nepal? Please tell your government to not mess with India. We helped you in your tough time, didn't expect this.
@anishkumar6508
@anishkumar6508 4 жыл бұрын
@@rkgrap Bhai chor do uske channel ko immediately aa gaye Nepal s ho this and that such a simple Guy teaching web concepts in Hindi.What he has to do with politics of communists in Nepal. Let him teach and dont feed his comments with negativity.
@ranjitdesai3926
@ranjitdesai3926 3 жыл бұрын
@@rkgrap Look the fantastic way in which he teaches....don't get into politics. He is jus fantastic. People have knowledge but having skills to impart that knowledge is a great skill and this chap has an extraordinary skill of being a good teacher. nobody gives damn about from where he is.
@khatariinsaan5284
@khatariinsaan5284 2 жыл бұрын
*if you facing the problem that Alert is Showing twice then* *Remove the StrictMode in Index.js*
@rajusinghrajput4442
@rajusinghrajput4442 4 жыл бұрын
Sir ap har video bhut achi banate he par sir doubt clear nhi karte he to hm user ka apka chenal subscribe karne ka ya mat lab ap ko comments ka answer to dena chahiye
@amithshetty2289
@amithshetty2289 2 жыл бұрын
when return () and return {} is used, sometime they use () and sometime {}.
@harpinderO
@harpinderO 3 жыл бұрын
if, else se better ternary operator : const Den = () => { (val === 0) ? setVal(0,alert('sorry, you value is rached')) : setVal(val - 1) }
@cciecloud
@cciecloud 3 жыл бұрын
Bhai javascript mai increment and decrement nhi banaya kya so nay
@arpitjainaj007
@arpitjainaj007 4 жыл бұрын
no need of setNum(0) as you already did in while declaring state as default value
@hiralalumeshkumhar1054
@hiralalumeshkumhar1054 2 жыл бұрын
Haar maane waalo ki kabhi haar nahi hoti 😂😂,I guess idhar Change hona chaiye
@abhipanchal938
@abhipanchal938 3 жыл бұрын
Hlww ...Muje Is Video ka Drescription chaiye With code
@aamirsaleem5294
@aamirsaleem5294 4 жыл бұрын
osm
@moviessplex
@moviessplex 4 жыл бұрын
woooooooo
@rahulkashyap-jp1vt
@rahulkashyap-jp1vt 4 жыл бұрын
bhaiya galat ho gya " HAR { NA } MANNE WALO KI KABHI HAR NAI HOTI " and thanks for your support luv u
@aniketyadav6009
@aniketyadav6009 3 жыл бұрын
👍👍✌️
@hannanafridi1649
@hannanafridi1649 3 жыл бұрын
💗
@amancuber5235
@amancuber5235 Жыл бұрын
5:30
@raghavendrakesari337
@raghavendrakesari337 3 жыл бұрын
Please apne videos paid nh kr dena.Free me itne achhe learning kahi nh hai
@syedsaad317
@syedsaad317 3 жыл бұрын
hello everyone i used the following code and it wroks well... is this correct?? else { alert("Minimum number reached"); event.preventDefault(); } gives the same output @thapa_technical??
@DemonHeadYT
@DemonHeadYT Жыл бұрын
Done :) import "./App.css"; import React, { useState } from "react"; function App() { const [count, setCount] = useState(0); const incre = () => { setCount((count) => count + 1); }; const decre = () => { if (count === 0) { alert("Number can't be Negative"); return; } setCount((count) => count - 1); }; return ( {count} Increment Decrement ); } export default App;
How to use Material UI Icons in React App in Hindi in 2020 #42
10:10
Thapa Technical
Рет қаралды 127 М.
Building a Todo List App Project in ReactJS from Scratch in Hindi in 2020
48:27
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
Spongebob ate Michael Jackson 😱 #meme #spongebob #gmod
00:14
Mr. LoLo
Рет қаралды 10 МЛН
Context API in React JS in Hindi in 2020 #51
25:10
Thapa Technical
Рет қаралды 253 М.
#33: Handling Events in ReactJS in Hindi in 2020
22:09
Thapa Technical
Рет қаралды 168 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 678 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 95 М.