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

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 129

  • @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 года назад +10

    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 3 месяца назад

    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

  • @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 года назад +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?

  • @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

  • @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

  • @vibhukumar3806
    @vibhukumar3806 3 года назад +2

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

  • @CoderSineNomine
    @CoderSineNomine 2 года назад

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

  • @bikramrumba3463
    @bikramrumba3463 3 года назад

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

  • @privateuser047
    @privateuser047 10 месяцев назад

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

  • @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 💘

  • @juhiojha2050
    @juhiojha2050 2 года назад

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

  • @berad6034
    @berad6034 2 года назад

    Best explanation on RUclips. You're the man. Liked and subscribed

  • @atharvavetal453
    @atharvavetal453 3 года назад +1

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

  • @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.

  • @crappycoders
    @crappycoders 2 года назад

    Yep thats what i needed before going to building the apps

  • @optimusworld
    @optimusworld Год назад

    Thanks alot, your teaching was easy to understand.

  • @eyoeltekle
    @eyoeltekle 3 года назад +1

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

  • @frogonajetski
    @frogonajetski 2 года назад

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

  • @bsal5347
    @bsal5347 3 года назад

    Nobody can teach react better than the papa.

  • @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.

  • @baylonyap1113
    @baylonyap1113 6 месяцев назад

    nice and clear man, thanks bro

  • @fotballidolfacts
    @fotballidolfacts 3 года назад +4

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

  • @yaeldekanu9246
    @yaeldekanu9246 2 года назад

    Great job! You do a great job explaining everything

  • @swayampravodasgupta2956
    @swayampravodasgupta2956 3 года назад

    Dropped in for my monthly show of gratitude

  • @DevlogBill
    @DevlogBill 2 года назад

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

  • @salarhashemian3436
    @salarhashemian3436 2 года назад

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

  • @passsacaglia
    @passsacaglia 3 года назад

    PAPAFAM here!

  • @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 -

    );

  • @srinivasaraoyp3640
    @srinivasaraoyp3640 3 года назад

    Very interesting video. Thank you.

  • @devislight
    @devislight 2 года назад

    Thank you so much 👨‍🏫🙋‍♂️

  • @theetechverge7723
    @theetechverge7723 3 года назад +1

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

  • @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

  • @dx497
    @dx497 3 года назад

    I Love you Sonny superb tutorial 🚀🚀

  • @shopsrise5137
    @shopsrise5137 3 года назад

    Thanku ❤ #PAPAfam
    New video from Dubai 😌🔥

  • @emmanuelmanana1527
    @emmanuelmanana1527 3 года назад

    lessons from the master, brilliant

  • @informatyx1
    @informatyx1 3 года назад

    You always provide valuable content ❤️❤️

  • @luclekene8592
    @luclekene8592 3 года назад

    thank you so mush i love your work

  • @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

  • @nimasherpa8608
    @nimasherpa8608 3 года назад

    Your videos are awesome

  • @jimmyopot1972
    @jimmyopot1972 3 года назад

    Very informative, well understood useState hook.

  • @markj.voltaire5620
    @markj.voltaire5620 3 года назад

    great explanation

  • @4amfocus
    @4amfocus 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

  • @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 😉

  • @edwarda7096
    @edwarda7096 3 года назад

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

  • @4amfocus
    @4amfocus 3 года назад

    Sonny great intro that you have bro

  • @ruebenhales8558
    @ruebenhales8558 2 года назад

    Great content!

  • @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 😁

  • @oxydoum
    @oxydoum 3 года назад

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

  • @boujeeblackbabe2.0
    @boujeeblackbabe2.0 2 года назад

    Thanks!!

  • @Arabian_Abomination
    @Arabian_Abomination 3 года назад

    Nice sunny. I see that Dubai tan! 😁🎉

  • @zstudio6127
    @zstudio6127 3 года назад

    Boom Sony!!.. Love from BD

  • @farhanmaqsood9498
    @farhanmaqsood9498 3 года назад

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

  • @arjunjoshi3481
    @arjunjoshi3481 3 года назад

    Ayyy intro in Dubaiiii. Niceeeeee

  • @xperwar
    @xperwar Год назад

    love the content !!

  • @murtazaali5083
    @murtazaali5083 3 года назад

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

  • @mykesoftware3044
    @mykesoftware3044 3 года назад

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

  • @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!

  • @Bannords
    @Bannords 2 года назад

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

  • @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.

  • @lawrencemotions8720
    @lawrencemotions8720 3 года назад

    love this is there any mongo db content coming .

  • @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

  • @mitotv6376
    @mitotv6376 Год назад

    Nice video

  • @anaskhan4841
    @anaskhan4841 3 года назад

    Love you man

  • @bernardmuchemi196
    @bernardmuchemi196 2 года назад

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

  • @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

  • @TarunSingh24
    @TarunSingh24 3 года назад +1

    PLease make tutorial like this for - useEffect

  • @Faysal-Mridha
    @Faysal-Mridha 3 года назад

    We are PapaFam 🥳

  • @mohammedsafwans1153
    @mohammedsafwans1153 3 года назад +1

    Newsletter fam, where you at???

  • @JoonasKarp
    @JoonasKarp 3 года назад

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

  • @Saur3n
    @Saur3n 3 года назад

    yoo sonny you are the best :)

  • @akhileshmishra5559
    @akhileshmishra5559 3 года назад +1

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

  • @godfataliti
    @godfataliti 2 года назад

    Agradecido con el de arriba 😊

  • @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.

  • @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

  • @mohibkhan2492
    @mohibkhan2492 3 года назад

    I remember this module was in skillshare 101 modules!

  • @charuwaka1
    @charuwaka1 3 года назад

    please make tutorial on useEffect with same example

  • @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 😂😂😂

  • @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

  • @pawanbhatt3847
    @pawanbhatt3847 3 года назад

    Nice sir

  • @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

  • @familythestephens9739
    @familythestephens9739 3 года назад

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

  • @drphil2424
    @drphil2424 2 года назад

    PAPA SONNY WE LOVE YOU

  • @tauraikuvarega1580
    @tauraikuvarega1580 3 года назад

    can you do a class-based component tutorial

  • @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)

  • @kushagra-aa
    @kushagra-aa 3 года назад

    how to use arrays in state?

  • @niravrk5446
    @niravrk5446 3 года назад

    Wait for next video

  • @aryan7069_
    @aryan7069_ 3 года назад

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

  • @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;

  • @goffy0101
    @goffy0101 2 года назад +1

    why are you talking about class components still?

  • @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

  • @dipanjandas9463
    @dipanjandas9463 2 года назад

    Create a video about login form in React js.

  • @fayasahamed5587
    @fayasahamed5587 3 года назад

    If you teach axois and formik for validation

  • @ekansh03
    @ekansh03 3 года назад

    Couldn't understand it better.

  • @hasanahmed9917
    @hasanahmed9917 3 года назад

    do a tutorial on redux thunk or redux saga using the redux toolkit

  • @cryptomallu6271
    @cryptomallu6271 Год назад

    best video

  • @eriksark2102
    @eriksark2102 3 года назад

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