Learn to use State in React in 19 minutes (for beginners)

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 130

  • @SonnySangha
    @SonnySangha  2 роки тому +2

    📬Do you want DAILY coding problems sent DIRECTLY to your Inbox? (with solutions the next day) 👉 links.papareact.com/university

  • @c9m853
    @c9m853 3 роки тому +9

    Hi Sonny, i want to thank you from my bottom of my heart. With you and your videos i managed to do my last year license project and got an internship in a web development company . Now i am focusing on working hard and grow. You are awesome, can't wait for your next video.

  • @avneesh0612
    @avneesh0612 3 роки тому +19

    The new intro is sickkk

  • @KatarinaClaes-q1p
    @KatarinaClaes-q1p 2 місяці тому

    The way you use vscode to with comments to visually show us what's happening is insanely helpful compared to how a lot of other people show code, your voice is clear and concise while also still putting emphasis on import details is godly. thank you for making these react videos

  • @inspisiavideos8542
    @inspisiavideos8542 3 роки тому +2

    Sonny Shanga I had an internship as QA this Summer. They interviewed me again this past Wednesday and they will extend me the paid internship only this time it will be as React Engineer until the end of the year. The company protects Hospitals data (that’s all I’m saying). They liked the amazon and the airbnb clone I did from your channel. They told me they don’t have open positions for entry level but there might be some available later this year. Thanks man

  • @achtube85
    @achtube85 3 роки тому +24

    FINALLY a video that uses a simple example to show how to transition from Class to Functional. This is so freaking useful. Blessed!!!

    • @jons_RoadtoCode
      @jons_RoadtoCode Рік тому +2

      Yes exactlly! what a struggle is been to get this clarified!
      As someone who spent days on vanilla JS creating a counter app (LOL), I really appreciated how Sonny compared the two. Understanding useState finally clicked for me with this teaching method.
      Welp, this is my first video watched from Sonnys huge playlist, time to apply what I've learned and then check out some more :)

    • @itsgojoverfr
      @itsgojoverfr Рік тому +1

      @@jons_RoadtoCode hey jons it's been 6 months, have you landed a job or are you still learning?

    • @jons_RoadtoCode
      @jons_RoadtoCode Рік тому

      Hey@@itsgojoverfr !
      I'm still on the self-taught learning path, I've come quite a long way from the 6 month old post and I thank you for the follow up!
      I have not applied for any jobs yet, I'm still not 100% confident I'm well rounded enough to bring value to an entry level role just yet. I am working on a full stack pet project, I found this to be the best way to learn although it certainly has taken its toll on me, mentally and time-wise. It's been great so far since I've now learned how to create a front end with React, backend with Node.js and calling API's from the db, in my case, MySql (with MySql Workbench).
      I took a 2 week break but am getting back to it today actually.
      My goal is to start applying for jobs in 2024, being that I am self-taught and work in an unrelated field, I'll need at least some full stack projects in my portfolio to substitute the lack of formal education and experience.
      I'd be interested to hear about your current journey?

  • @enfieldli9296
    @enfieldli9296 3 роки тому +1

    State is the react way of definning variable, this is so refreshing!

  • @mohibkhan2492
    @mohibkhan2492 3 роки тому +11

    Great video Sonny, please make a detailed video on useContext hook. Thanks

  • @connorhodgson3873
    @connorhodgson3873 3 роки тому +7

    Hey sonny. Just wanted to say how much I appreciate you sharing your knowledge with us. I am a beginner aspiring web developer, more interested in the front end but also know it is important to learn a lot of the back end too these days. All of this seems impossible to learn right now but I know if I stick it out it will be worthwhile in the end. Any advice you have would be appreciated! Thanks again

  • @atharvavetal453
    @atharvavetal453 3 роки тому +1

    This gus is so much hardworking he is even working on his holidays wow manh thats great ❤️

  • @bikramrumba3463
    @bikramrumba3463 3 роки тому

    I truly appreciate you for being there. Keep rocking!!

  • @CoderSineNomine
    @CoderSineNomine Рік тому

    Here i am after almost 5 confusing videos, finally got it! subscribed and looking forward for more.. thanks Sonny!

  • @vibhukumar3806
    @vibhukumar3806 3 роки тому +2

    The best REACT channel out there by quite a margin. Keep up the good work🔥

  • @BenOdari
    @BenOdari 3 роки тому

    Sonny You be crowned the God of Reactjs I learn alot from This Channel...Lots of Love from Kenya

  • @eyoeltekle
    @eyoeltekle 2 роки тому +1

    What a nice tutorial bro, I was struggling to understand this concept because most tutorials use complex examples this though was brilliant, tnxs

  • @crappycoders
    @crappycoders Рік тому

    Yep thats what i needed before going to building the apps

  • @TinyMaths
    @TinyMaths Рік тому

    Just come across your channel (I think) and liking the way you explain things.
    After just over a year of leaning JavaScript and building many projects, I decided last week to take the plunge and begin learning React. Looks like I'll be frequenting your channel quite a bit.

  • @roshanguragain5578
    @roshanguragain5578 3 роки тому

    I just found your channel and I can't control myself to say you are awesome. Anyway happy teachers day. Love you 💘

  • @privateuser047
    @privateuser047 9 місяців тому

    Best video explanation I've ever seen. Your videos are legit, man.

  • @DevlogBill
    @DevlogBill 2 роки тому

    Wow I'm happy I began learning React after Hooks came out versus a class system, thank you for sharing.

  • @frogonajetski
    @frogonajetski 2 роки тому

    This is THE best video explanation I have seen on this. Thank you so much. I totally understand now.

  • @berad6034
    @berad6034 2 роки тому

    Best explanation on UA-cam. You're the man. Liked and subscribed

  • @abhijeetmokale5604
    @abhijeetmokale5604 3 роки тому +1

    Bro! Your way of explaining things is #awesome ! After all this time ,Now I feel confident in states!! Glad you started making this lesson videos.

  • @bsal5347
    @bsal5347 3 роки тому

    Nobody can teach react better than the papa.

  • @swayampravodasgupta2956
    @swayampravodasgupta2956 3 роки тому

    Dropped in for my monthly show of gratitude

  • @juhiojha2050
    @juhiojha2050 2 роки тому

    your videos have so clearty..........your videos are amezing .......... :)

  • @optimusworld
    @optimusworld 11 місяців тому

    Thanks alot, your teaching was easy to understand.

  • @Salah-YT
    @Salah-YT 2 роки тому +1

    thanx bro here more easy way
    const [count, setCount] = useState(0);
    return (

    You clicked {count} times
    setCount(count + 1)}>Click me +
    setCount(count - 1)}>Click me -

    );

  • @fotballidolfacts
    @fotballidolfacts 3 роки тому +4

    Great video, can you do a tutorial for Redux too?

  • @juansebastianvalenciajimen2751
    @juansebastianvalenciajimen2751 3 роки тому +1

    Remember guys that we can create our hooks called custom hooks, these custom hooks help us to share the logic for differents components

  • @lalasmith2137
    @lalasmith2137 3 роки тому

    Hey Sonny, new subscriber here- been binge watching all the challenges and trying for myself and the clones you built - just incredible and amazing that i found your channel.
    May i ask for some advanced projects as well? maybe with more focus on logic, form validations, server side requests just to learn the best practices from you! much love

  • @yaeldekanu9246
    @yaeldekanu9246 2 роки тому

    Great job! You do a great job explaining everything

  • @passsacaglia
    @passsacaglia 3 роки тому

    PAPAFAM here!

  • @edwarda7096
    @edwarda7096 3 роки тому

    Thanks Sonny!
    Would love a video or two using React-Spring in an app

  • @martinkristofferssonn
    @martinkristofferssonn 2 роки тому +1

    Great video! Please don't use vocals in your background music. It makes it sometimes hard to focus on what you are saying.

  • @georgeyvb4460
    @georgeyvb4460 3 роки тому +5

    Hey a Trello clone would be cool, specially the drag n drop with auth and saving the data to a database with Nextjs

  • @baylonyap1113
    @baylonyap1113 4 місяці тому

    nice and clear man, thanks bro

  • @theetechverge7723
    @theetechverge7723 3 роки тому +1

    So dope Mr #papareact!!! #papafamforever much love....

  • @salarhashemian3436
    @salarhashemian3436 2 роки тому

    Keep up the good work man
    this video was really help full

  • @govindbchandran8681
    @govindbchandran8681 3 роки тому +2

    Somehow didn't get the actual sonny sangha vibe. Maybe the music and the hype and stuff we get in livestreams. Great vid tho 😁

  • @arjunjoshi3481
    @arjunjoshi3481 3 роки тому

    Ayyy intro in Dubaiiii. Niceeeeee

  • @jimmyopot1972
    @jimmyopot1972 3 роки тому

    Very informative, well understood useState hook.

  • @murtazaali5083
    @murtazaali5083 3 роки тому

    Hi, Sonny great content. Highly recommend to make a react tutorial playlist. Cheers

  • @farhanmaqsood9498
    @farhanmaqsood9498 3 роки тому

    You are amazing papa react
    Can you please make full tutorial on react js

  • @emmanuelmanana1527
    @emmanuelmanana1527 3 роки тому

    lessons from the master, brilliant

  • @devislight
    @devislight 2 роки тому

    Thank you so much 👨‍🏫🙋‍♂️

  • @shopsrise5137
    @shopsrise5137 3 роки тому

    Thanku ❤ #PAPAfam
    New video from Dubai 😌🔥

  • @srinivasaraoyp3640
    @srinivasaraoyp3640 2 роки тому

    Very interesting video. Thank you.

  • @lexsemenenko
    @lexsemenenko 3 роки тому

    What's a good way to update a nested property of an object in useState? My state stores an object with a property that holds an array. I need to update array items. The way I am doing it now is to clone the whole object, do the update, and then put the whole updated object back into useSate. Appreciate!

  • @zstudio6127
    @zstudio6127 2 роки тому

    Boom Sony!!.. Love from BD

  • @markj.voltaire5620
    @markj.voltaire5620 3 роки тому

    great explanation

  • @jonroni5756
    @jonroni5756 2 роки тому +1

    Hello Sir!
    I have problem in useState:
    import React, {useState} from 'react'
    function App(){
    var [data, dataUpdate]=useState(0);
    function change(){
    dataUpdate(data+1);
    }
    return (
    {data}
    change()}>Click Here
    )
    }
    export default App
    Whenever i used useState it shows me the blank page after execution

    • @lukas.webdev
      @lukas.webdev Рік тому

      Try changing it to: Click Here 😉

  • @bernardmuchemi196
    @bernardmuchemi196 2 роки тому

    We've never seen your lefts side of the face Sonny😂😂

  • @mykesoftware3044
    @mykesoftware3044 3 роки тому

    Long time bruh🤩React native project man.Bell is on

  • @Faysal-Mridha
    @Faysal-Mridha 3 роки тому

    We are PapaFam 🥳

  • @juansebastianvalenciajimen2751
    @juansebastianvalenciajimen2751 3 роки тому

    Sonny great intro that you have bro

  • @mohammedsafwans1153
    @mohammedsafwans1153 3 роки тому +1

    Newsletter fam, where you at???

  • @nimasherpa8608
    @nimasherpa8608 3 роки тому

    Your videos are awesome

  • @informatyx1
    @informatyx1 3 роки тому

    You always provide valuable content ❤️❤️

  • @Bannords
    @Bannords 2 роки тому

    Ты крутой, спасибо! I mean you are super rockstar)) thanks for guide)

  • @oxydoum
    @oxydoum 3 роки тому

    Thanks bro, do you know how to do a waveform in a audio player with react?

  • @azad9655
    @azad9655 3 роки тому

    Hey sonny, Make a video on Rest Api with React. Some of the APIs are very nested. not so easy to use. Would love to see how you manage the API

  • @luclekene8592
    @luclekene8592 3 роки тому

    thank you so mush i love your work

  • @ruebenhales8558
    @ruebenhales8558 2 роки тому

    Great content!

  • @dx497
    @dx497 3 роки тому

    I Love you Sonny superb tutorial 🚀🚀

  • @Arabian_Abomination
    @Arabian_Abomination 3 роки тому

    Nice sunny. I see that Dubai tan! 😁🎉

  • @martumbao2760
    @martumbao2760 3 роки тому

    Hi, Sonny can you have a discount for the price for other country. Because the euro value for us is too expensive. And I just wanna thank you for your tutorials. It is very useful and easy to understand with your approach.

  • @timileyinquadri8668
    @timileyinquadri8668 2 роки тому

    Hello sonny, you mentioned something about making state persistent with a database, how does this work…or if anyone knows how kindly share, because I have a toggle button that makes a call to an endpoint and every time I refresh the page or go to another tab in the app it resets back to the default

  • @mohibkhan2492
    @mohibkhan2492 3 роки тому

    I remember this module was in skillshare 101 modules!

  • @JoonasKarp
    @JoonasKarp 3 роки тому

    Could you possibly make tutorial on how to test react using Jest ?

  • @xperwar
    @xperwar Рік тому

    love the content !!

  • @mkilphewer2425
    @mkilphewer2425 3 роки тому

    Iam a newbie
    The doubt i have is,in this video when u created a class based component and then import it in index.js..what u did is import app from (its location)...but the name of the component was not app right?..it was "appclass"..then how did it display it in the browser without any error..and even when u render the component in index.js..u simply wrote ..shouldn't it be ?
    Iam totally a beginner..need help

  • @boujeeblackbabe2.0
    @boujeeblackbabe2.0 2 роки тому

    Thanks!!

  • @drphil2424
    @drphil2424 2 роки тому

    PAPA SONNY WE LOVE YOU

  • @anaskhan4841
    @anaskhan4841 3 роки тому

    Love you man

  • @thirdojohnson4325
    @thirdojohnson4325 3 роки тому

    I really wished this guy taught python. Damn you are a good teacher

    • @swamini.pandit
      @swamini.pandit 3 роки тому

      Module not found: Can't resolve 'firebase' in please solution

  • @deepaknegi4317
    @deepaknegi4317 3 роки тому

    Hello, could you explain how to update multiple state variables depending on one another in functional Components like in-class components we can pass back a callBack to this.setState, we callback will update the state after it.
    in class component-->
    this.state ={count:0,ans:1}
    this.setState((prev)=>{return {...prev, count : count+1}},(prev)=>{return {...prev, ans: count * 2}});
    in this way first "count" will be updated and then "ans" will be updated. How to achieve the same with functional
    components.
    in functional component-->
    const [count, setCount] = useState(0);
    const [ans, setAns] = useState(1);

    setCount(prev=>prev+1);
    setAns(prev=>count * 2);
    but as state updation is an async process then "setAns" could have old value of "count" i.e 0;

  • @akhileshmishra5559
    @akhileshmishra5559 3 роки тому +1

    Please sonny make one comment section with nested reply like and dislike system using usereducer and context please....👍👍

  • @lawrencemotions8720
    @lawrencemotions8720 3 роки тому

    love this is there any mongo db content coming .

  • @TarunSingh24
    @TarunSingh24 3 роки тому +1

    PLease make tutorial like this for - useEffect

  • @mitotv6376
    @mitotv6376 Рік тому

    Nice video

  • @tapanranipa
    @tapanranipa 3 роки тому

    Hey dude please make a video on usereducer hook it is very complex in terms of how to use it and under which scenarios?? Please make a damn awesome video about it like you always make other ones 😂😂😂

  • @ekansh03
    @ekansh03 3 роки тому

    Couldn't understand it better.

  • @niravrk5446
    @niravrk5446 3 роки тому

    Wait for next video

  • @karanjoshi12
    @karanjoshi12 3 роки тому

    Please please please on complete dedicated video on redux (tips and tricks) to learn in (like you taught context API in Amazon clone)

  • @Saur3n
    @Saur3n 3 роки тому

    yoo sonny you are the best :)

  • @charuwaka1
    @charuwaka1 3 роки тому

    please make tutorial on useEffect with same example

  • @manasahr478
    @manasahr478 Рік тому

    How to fetch data from api and how to create dropdown using fetched data.how to call function using selected option. Could you pls help me

  • @pawanbhatt3847
    @pawanbhatt3847 3 роки тому

    Nice sir

  • @cryptomallu6271
    @cryptomallu6271 Рік тому

    best video

  • @familythestephens9739
    @familythestephens9739 3 роки тому

    Make a desk setup video pls?!?!?!

  • @tauraikuvarega1580
    @tauraikuvarega1580 3 роки тому

    can you do a class-based component tutorial

  • @aryan7069_
    @aryan7069_ 3 роки тому

    I saw you teaching clever programmer then came to your channel lol

  • @dipanjandas9463
    @dipanjandas9463 2 роки тому

    Create a video about login form in React js.

  • @divyam2600
    @divyam2600 3 роки тому

    #papafam #papareact #sonnysanghe excitingly waiting for your new ui clone challenge as I have come up to this field recently in this month and started your amazon challenge which i am going to finish.. #amazonchallenge

  • @godfataliti
    @godfataliti 2 роки тому

    Agradecido con el de arriba 😊

  • @dreamseekerinfotech
    @dreamseekerinfotech 3 роки тому

    Hello there
    I am full stack developer
    I am doing job right now
    I want to start something for my own
    Can you help me out
    How can i boost up mu career in either as freelancer or and coach
    I don't know how to start
    Please please please 🙏 guide me

  • @eriksark2102
    @eriksark2102 3 роки тому

    Please do a react native snapchat clone! you're amazing

  • @0073988
    @0073988 2 роки тому

    Son Heung Min!

  • @fayasahamed5587
    @fayasahamed5587 3 роки тому

    If you teach axois and formik for validation