React JS - React Tutorial for Beginners

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

КОМЕНТАРІ • 4,9 тис.

  • @programmingwithmosh
    @programmingwithmosh  7 місяців тому +4

    - Want to learn more? Get my complete React mastery course: mosh.link/react-course
    - Subscribe for more videos like this: goo.gl/6PYaGF

    • @amitatlp
      @amitatlp Місяць тому

      So much annoying music in the background while you explain the project at 23:00 onwards

  • @idonthaveaname784
    @idonthaveaname784 2 роки тому +711

    2 years ago when I started to learn web development, I randomly came to this React Tutorial and back then I've doubted myself if I can get a job in software development. I almost quit this web development tutorial stuff but then I still believed in myself and now I am a React Developer and Tech lead in my team. thanks mosh!

    • @shohjaxonkomilov5201
      @shohjaxonkomilov5201 2 роки тому +10

      wow bro i really wanna be like you

    • @speedfastman
      @speedfastman 2 роки тому +16

      @@shohjaxonkomilov5201 Just believe in yourself!!!!!!!!!!!!

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

      @speedfastman thank youu

    • @swagatalakshmipal7711
      @swagatalakshmipal7711 2 роки тому +10

      I am in the same path as your early days that is tensed self doubt. But inspired from your words. Hope this tutorial work for me,😊

    • @learntry9074
      @learntry9074 2 роки тому +10

      @@swagatalakshmipal7711 I am turning 40 in few months :) .. you try to learn or not but the truth is you are always learning something , the question is that the something is what you wanted or its coming to you without your knowledge. And I think, whoever can answer this question can learn many many things irrespective of all barriers/ hurdles

  • @NN-gy7xl
    @NN-gy7xl 6 років тому +4954

    I am going to put "Trained by Mosh" on my resume and get all the jobs!

    • @89elmonster
      @89elmonster 6 років тому +180

      That's cheating you'd get every job instantly

    • @tradewithcpr1464
      @tradewithcpr1464 6 років тому +44

      I already did that

    • @yeeli7989
      @yeeli7989 6 років тому +31

      How many jobs you got so far??? I will do the same trained by Mosh

    • @i-am-oi
      @i-am-oi 6 років тому +10

      Please Mosh kindly help:
      I am writing a code that finds logical difference between two numbers and then print out the even numbers between the two numbers
      const myFunction = (x, y) => {
      // Code here
      if (x > y) {
      return (x%2 == 0)
      }
      else {
      return ('This is an Odd number')
      }
      }
      console.log(myFunction(10,2));

    • @taygrande_tv
      @taygrande_tv 6 років тому +3

      @@i-am-oi a little confused by the prompt.... 'finds the logical difference between two numbers', and 'print out the even numbers between the two numbers'.... clarify a little bit, and I should be able to help.

  • @lukaszp7827
    @lukaszp7827 5 років тому +377

    W10 update for VSC 1.38.1
    8:30 : file -> preferences -> settings -> text editor -> formatting : format on save

  • @murugappanm9883
    @murugappanm9883 3 роки тому +119

    This guy explains react better than the documentations. we are blessed to be living in the age of internet.

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

      Yes, online learning is the way to go these days, especially for coders! Are you a student or working currently? Would you be interested in job opportunities in software development roles?

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

      Yeah it helps a lot.

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

      @@shivanigaddagimath6105 do you have any job to offer?

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

      @@gopikannan7053 yes, we are a web development company and are looking for developers.

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

      @@shivanigaddagimath6105 Any Internships available for college students?

  • @tolvajkergetok
    @tolvajkergetok 5 років тому +587

    Mosh is by far the most awesome tutor on the entire net. I already took two of his Angular courses and it landed me in a pretty good job. For added difficulty I had concentration difficulties at the time due to serious trauma, so bad I literally couldn't read a page in one sitting. I genuinely felt that I can't carry on with my profession, but Mosh gave it all back to me. Now I'm switching to React, and he's still the only one who can flawlessly explain the entire mess. We have to come up with some super fancy award for this guy.

    • @tkssharma
      @tkssharma 4 роки тому

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

    • @yayz_
      @yayz_ 4 роки тому +18

      Man I just went through some serious stuff in life last year and this year I can barely focus or read.. I never thought it could be trauma related, I just thought it was normal stress but no matter how many breaks I take and try to go back it's still hard. It literally sucks the life out of you not being able to concentrate and retain information it's like my vision is zoomed in and I can't see the bigger picture. It always leads to frustration in the end. I'm watching this video wondering how far I'll be able to get into it before I lose focus and so far so good I'm glad I read your comment I hope this works for me.

    • @Aman-lv2sz
      @Aman-lv2sz 4 роки тому +4

      @@yayz_ More power to you. Everyone gets out of their problems. Good luck man

    • @dragonballsuper1519
      @dragonballsuper1519 4 роки тому +11

      @@yayz_ sometimes having a foggy mind could be due to a lack of important vitamins like Vitamin D. Start taking that along with a glass of pomegranate juice every day, because the latter is great for the mind, especially the memory part of your brain.

    • @yayz_
      @yayz_ 4 роки тому +4

      @@dragonballsuper1519 Thanks for the advice, I will definitely try that out !

  • @Dherlandsson
    @Dherlandsson 3 роки тому +503

    43:12 If you, like me, installed the latest version of bootstrap (v5 at the time of writing this) the "badge-primary" won't work. In bootstrap v5 it's changed to "bg-primary" and "bg-secondary" etc instead, so try className="badge bg-primary m-2" for it to function correctly!

    • @nilmour
      @nilmour 3 роки тому +6

      upvote. wasted close to 45 mins to find out where I did wrong then I saw I installed latest bootstrap which is v5.0.

    • @abhishekr5910
      @abhishekr5910 3 роки тому +6

      Thank you @Davve1001

    • @ayoubrais5534
      @ayoubrais5534 3 роки тому +8

      Aswell for the "badge-pill" , you can use "rounded-pill" instead !

    • @Mackenzie865
      @Mackenzie865 3 роки тому +3

      Wow, such a great help! I was super confused as to what I did wrong. Thanks!

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

      Thank you! Almost wasted a ton of time with this until I happened to see your comment.

  • @simplesimon2960
    @simplesimon2960 4 роки тому +60

    This is the fourth React app I've built from a tutorial but the first one where I was actually able to understand what was going on because of how it was all explained in detail. Really excellent style of teaching and much appreciated!

  • @evelynbrandonsmusicchannel9235
    @evelynbrandonsmusicchannel9235 3 роки тому +18

    My god, cannot believe that you provide this for free, really really appreciate it !!!

  • @imranq9241
    @imranq9241 4 роки тому +85

    React is really elegant in the way it is designed and compiled. Kudos to the facebook team, and of course Mosh who taught us!

  • @thefthesm
    @thefthesm 4 роки тому +260

    TABLE OF CONTENT
    00:00 Introduction
    01:14 What is React
    05:48 Setting Up the Development Environment
    09:27 Your First React App
    16:03 Hello World
    22:26 Components
    24:06 Setting Up the Project
    26:15 Your First React Component
    31:38 Specifying Children
    35:56 Embedding Expressions
    40:49 Setting Attributes
    46:36 Rendering Classes Dynamically
    50:57 Rendering Lists
    54:58 Conditional Rendering
    1:01:04 Handling Events
    1:03:56 Binding Event Handlers
    1:08:34 Updating the State
    1:10:51 What Happens When State Changes
    1:12:58 Passing Event Arguments
    1:17:31 Composing Components
    1:21:18 Passing Data to Components
    1:24:31 Passing Children
    1:27:44 Debugging React Apps
    1:31:55 Props vs State
    1:34:22 Raising and Handling Events
    1:39:16 Updating the State
    1:43:57 Single Source of Truth
    1:47:55 Removing the Local State
    1:54:44 Multiple Components in Sync
    2:00:39 Lifting the State Up
    2:06:18 Stateless Functional Components
    2:08:49 Destructuring Arguments
    2:10:52 Lifecycle Hooks
    2:12:32 Mounting Phase
    2:18:09 Updating Phase
    2:22:31 Unmounting Phase

  • @shaddygimmz948
    @shaddygimmz948 3 роки тому +39

    I had to pause the video to share my thoughts. It's just unbelievable how he explains everything so simply yet so effectively. I was looking for a perfect react video to get me started and I just landed on one..Thanks Mosh

  • @fahimimtiaz4532
    @fahimimtiaz4532 2 роки тому +10

    The comment section of this video is so helpful. Really good to see so many people willing to help out someone else so that they don't go through the trouble they went through

  • @vietgurlx3
    @vietgurlx3 3 роки тому +99

    Some error fixes that might be helpful --
    1:23:25 If you get "TypeError: Cannot read property 'value' of undefined" after adding this.props.value, try removing the Counter constructor in counter.jsx
    1:40:07 If your counterId is undefined, add prop "id={counter.id}" to your Counter component in counters.jsx
    2:04:13 Change your App.js to match the other classes ie. from "function App()" to class "App extends Component" ...and add "render()" to return your React.Fragment

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

      thank you very much

    • @Felix-dh9tl
      @Felix-dh9tl 2 роки тому +2

      this thing should be pinned by mosh

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

      bro what do you mean by removing the Counter constructor? Sorry, I`m new to programming

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

      true

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

      ur fix for 1:40:07 worked great for me ty!

  • @Lokk09
    @Lokk09 3 роки тому +18

    1:53:52 in handleIncrement(counter) you can simply update the value of counter directly since it is a pointer to the counter in the state, then just setState(counters)
    handleIncrement = (counter) => {
    counter.value++;
    const counters = this.state.counters;
    this.setState({ counters});
    };

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

      thanks, I couldn't understand his code at that point, therefor I came into the comment section with the idea that may somebody have easy code and found you

  • @mcan543
    @mcan543 4 роки тому +43

    #keyTakeAways
    39:00 A new syntax for me --> Gets count property of state and assigns it to new count constant.
    44:22 Applying your own styles in jsx
    47:22 Conditional styling
    51:51 Cant use loops in jsx elements. Use map(), filter() functions
    56:00 Two ways of conditional rendering
    1:06:30 Changing state variable arrow functions and setState()
    1:11:13 To pass an element to onClick event don't use an explicit intermediate handler function. Use this intermediate function inside the onClick()
    1:26:41 render variables in html in components

    • @MrJeffersonDias
      @MrJeffersonDias 2 роки тому +7

      I am getting an error "product' is noy defined after doing that change

  • @robertn4996
    @robertn4996 Рік тому +149

    I did struggle a lot to learn React. A lot of time that I wasted.
    The problem? I did not know the basics of Javascript in first place. You need to walk before you can run.
    So I took a few very basic books (books, not complex tutorials!) and learned the fundamentals.
    After I learned the basics of Javascript, learning React became much easier.
    Edit: For those asking about the books, for the very basics I learned with Javascript In Less than 50 Pages.
    And to develop my knowledge I learned with Head First Javacript Programming.

  • @luisr1421
    @luisr1421 5 років тому +18

    Dude, I've literally watched 100 videos on this and nothing clicked until I saw this. I LOVE YOU MOSH!

  • @swetabjahazra8050
    @swetabjahazra8050 5 років тому +48

    This is probably the best tutorial on React available on YT

    • @mohammedlaslaa9549
      @mohammedlaslaa9549 4 роки тому +1

      Is this video sufficient to beggining to learn react or i should to follow the full course of 10 hours ?

    • @omar_mtl
      @omar_mtl 4 роки тому +1

      Mohammed Laslaa take the 10 hours course, and then start building a project and then come back here if you are stuck.

    • @guitarman813
      @guitarman813 4 роки тому +4

      @@mohammedlaslaa9549 This is a good introduction and overview to React. Especially if you're like me and have never used it before. However, it's a crash course and so does not go heavily in-depth. I recommend to take this crash course first to get a feel for React and how it works. As well as its capabilities. But then do the full course afterwards to fill in the gaps missed in this crash course. Another good course to look at is the 5-hour course on freecodecamp. :-)

    • @mohammedlaslaa9549
      @mohammedlaslaa9549 4 роки тому

      Thanks 😊

  • @mishabruml
    @mishabruml 6 років тому +45

    good tutorial, but for anyone trying to follow and code along this is easy to miss: at 1:27:30 you say "we are going to delete the code that we wrote in this lecture" and delete the console log statement and child element of counter, but NOT the bit you also wrote where you assign the id property in props to counter.id. ( id={counter.id} ). this is really important to leave in as it will be referenced as the event argument of the delete button event handler

    • @chrisyang3130
      @chrisyang3130 6 років тому +5

      man you are the boss! I backtracked 3 times to see what went wrong before finding this comment! :D

    • @FromAtoO
      @FromAtoO 6 років тому +3

      You just made my day!

    • @mathieuclerte5252
      @mathieuclerte5252 6 років тому +3

      Yeah what a pain, he says at a point in time that id is a special attribute, but nowhere states that it should be declared explicitely in Counters.render() ... so I ended up having to write:
      that's sooo odd and verbose....

    • @sumeetwork
      @sumeetwork 6 років тому +1

      Thank you soo much for this... couldn't find what a I doing wrong.

    • @msg2clash
      @msg2clash 6 років тому +2

      well spotted mishabruml, - now it's working...

  • @NiketBahety
    @NiketBahety 2 роки тому +64

    Some tips from my side where you could face some issues-
    1. If you are watching this tutorial after April 2022 you should use react version 17 because version 18 is fairly new and it would be difficult to follow the tutorial.
    2. Components names in react should always start from capital letters.

  • @cartersteinhoff1994
    @cartersteinhoff1994 6 років тому +168

    Not all heroes wear capes. Thank you so much, Mosh. This was incredible.

    • @johnmadsen37
      @johnmadsen37 6 років тому +3

      carter steinhoff I wear a cape when I plan to expose myself in front of the Safeway.

    • @khateebanwer7466
      @khateebanwer7466 5 років тому +1

      we are being led by saitama

  • @Nafana
    @Nafana 6 років тому +12

    Great course! Did this with the most up to date node packages and used Bulma instead of Bootstrap and everything worked perfectly. So as of 2018-08-29 everything in the tutorial is up to date with the most current versions.

    • @rohitmalakar
      @rohitmalakar 6 років тому

      Style worked after adding this code in my index.js import "bootstrap/dist/css/bootstrap.css";

  • @destinyjames6117
    @destinyjames6117 4 роки тому +69

    8:40
    On windows, go to file -> Preferences -> Settings
    Edit: Then, at the search bar at the top, search for "format on save".
    Tick the small box to enable it :)
    Then, at setting, search for "Default format"
    At "Editor: Default formater", select from null to prettier-vscode for it to work :)

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

      How to create react app on windows?

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

      @@joandianamilton1074 I'm using node.js to use npm, and then from npm install create-react-package, and then go to directory i want to create react package from node.js command prompt, type create-react-app my-react-app-title

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

      @@destinyjames6117 if I type npx create-react-app my-app, it's throwing a error saying
      Error: EPERM: operation not permitted, mkdir 'C:\Users\joan'
      Command not found: create-react-app

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

      @@joandianamilton1074 Try "npm i -g create-react-app"
      This will install create-react-app for use
      If not, try this:
      "npm i create-react-app"

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

      Thank you so much James😍

  • @leochuks1
    @leochuks1 Рік тому +3

    I recently switched my career from Data Analysis/Science to Full stack web development. As a result, I needed to learn React JS, I have looked up a lot of online videos on this topic, although they were helpful, but I must confess this course by Mosh is second to none. You deserve an award! God bless you if you believe.

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

      Hello Leonard,
      May I know how did you switched career to Web development since the experience is on other domain?

  • @Forlloma
    @Forlloma 6 років тому +12

    The guy is good. Clear. Teaching qualities you've got. And you are smart. Don't change am following

    • @tkssharma
      @tkssharma 4 роки тому +1

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

  • @enderksenobojca3775
    @enderksenobojca3775 4 роки тому +12

    I have to admit that I did train a lot of people in programming. As an IT architect I had to learn a lot of new technologies and pass it to other people in my day to day work. The way how you teach is very good; balanced. You explain all concepts clearly at the same time avoiding throwing too much on the listener. It’s a hard Art to master. Respect.

  • @amaliabryant7341
    @amaliabryant7341 3 роки тому +25

    Thank you so much for this course. I was trying to learn React through an online course but was getting so confused. Your style is very easy to follow and I have gained a stronger grasp on the material.

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

      I know the basics of JS , OOP in JS and ES6 hacks. I was wondering whether a full fledged react course with projects would be suitable or learning react through this video and then search for projects would be ideal. Can someone give me a feedback ?

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

      @@rishabhchopra883 I think this video is enough and going on your own and doing projects is the best way if you are comfortable with it, since it forces you to think
      however that depends on how comfortable you are with the prerequisites to react
      so if you are just starting out courses might serve quite well
      and his teaching style is so good, I might give them a try myself

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

      @@darshandev1754 hey bro do you have any idea about mosh's java course. are they worth money?

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

      @@ak332 sorry I haven't tried them so can't say about it

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

      @@darshandev1754 hey is this course updated? Because in his website it says its updated in jan 2020 so should i buy this course??

  • @smiling_assasin
    @smiling_assasin Рік тому +5

    I appreciate how mosh makes things looks so much easier with great examples, and doesn't skip concepts like many other youtubers ... ❤️

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

      Totally agree, the same way a great athlete makes hard things look easy to do, a great teacher makes coding looks easy too, even coding beeing hard most of the times =)

  • @cristiandumitriu1245
    @cristiandumitriu1245 4 роки тому +107

    How to fix: "npm ERR! missing script: start" when trying to run.
    1. Uninstall the global version of the create-react app :
    Write in your console: uninstall -g create-react-app
    2. Delete the folder react-app (if this is the name of your react project)
    3. Recreate your new project locally
    Write in your console: npx create-react-app react-app
    4. go into your react-app folder and type
    npm start .... Have fun
    This error is happening because create-react-app is not allowed to be used globally for some time

    • @Slurbisaur
      @Slurbisaur 4 роки тому +15

      1. the line should have npm infront of it: npm uninstall -g create-react-app

    • @giladfuchs2377
      @giladfuchs2377 4 роки тому

      @@Slurbisaur In my case I also need to delete the path..
      so I use this command
      which create-react-app | sudo xargs rm

    • @michaelhofby
      @michaelhofby 4 роки тому +2

      Thanks alot Christian! Couldnt get it to work properly

    • @a7med4973
      @a7med4973 4 роки тому

      thank you!

    • @faisalfida9929
      @faisalfida9929 4 роки тому

      React/Python Lover Come Here!
      Let's learn and practice together : discord.gg/vwgACw

  • @dionemartins0212
    @dionemartins0212 3 роки тому +14

    Got an internship interview and they asked that I made a React site in 2 weeks, to see how my code is and such. This guy literally saved me lmfao

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

      O shit man this way of interview would be really relaxed never seen before.

  • @adeoke3086
    @adeoke3086 4 роки тому +5

    I’ve not even finished watching the video and already you have mastered how to give me a fluffy feeling that it’s gonna be interesting and fun. I think I’ll enjoy this.

  • @elinordeniz
    @elinordeniz 2 роки тому +7

    on 20:00
    import ReactDOM from 'react-dom';
    root.render(element)
    those had been removed from version 18, instead you will use below
    import {createRoot} from 'react-dom/client'
    const root=createRoot(document.getElementById('root'))
    root.render(element)

  • @jonasking3670
    @jonasking3670 2 роки тому +14

    8:55 in version 1.59.0 of VS Code you go to Settings, then to Text Editor, then to Formatting and then click "Format on Save".

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

      You deserve more likes!

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

      Thank you so much, was struggling with this since 15 minutes!

  • @nilupulheshan27
    @nilupulheshan27 5 років тому +7

    Mosh's teaching is pure and clear as his head. thank you. I learn a lot.

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

      Hi Nilupul! Are you studying or working currently? Would you be interested in job opportunities in software dev?

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

      ​@@shivanigaddagimath6105 Yes nice to hear, Can you give me more details. I'm currently working in startupcompany.

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

      @@nilupulheshan27 Thanks for your response! Can we please connect via LinkedIn for more details? I have sent you a request on LinkedIn. Please accept.

  • @andrewz100
    @andrewz100 3 роки тому +29

    If anyone is having trouble installing and using create-react-app (because the one he is using is very outdated), here are the commands to install the latest version and create a new application:
    npm init
    npm install create-react-app (don't use -g)
    npx create-react-app react-app
    cd react-app
    npm start

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

      yes correct, but you could use yarn start as well because create-react-app suggests that only.

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

      Thank you i was struggling with this

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

      Thanks for this

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

      Thanks man

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

      Why no -g? Just wondering..

  • @pujadey355
    @pujadey355 10 місяців тому +2

    How can you be so good??? Like literally with such a good explanation and clarity. U made this so simple. Thanks mosh

  • @farbodjamali
    @farbodjamali 5 років тому +15

    I have passed many courses learning react and this one is the best with High-quality contents. Thank you, Mr. Mosh "Dastet dard nakone"

    • @mohammedlaslaa9549
      @mohammedlaslaa9549 4 роки тому

      Is this video sufficient to beggining to learn react or i should to follow the full course of 10 hours ?

  • @reenagarg7996
    @reenagarg7996 5 років тому +9

    You are just great Mosh! Whenever i have to learn something i directly go to your tutorials. You are all-rounder guy. Your tutorials are just awesome and your way of teaching is just incredible!!! In the video of approx 2hrs i can get my half of the things done about that particular topic. These 2hrs videos are equal to many books or i would say there is no one like you.
    So thank you so much for all of this knowledge!!
    Keep going ahead and keep sharing your knowledge like this!!

    • @faisalfida9929
      @faisalfida9929 4 роки тому

      React/Python Lover Come Here!
      Let's learn and practice together : discord.gg/vwgACw

  • @80Vikram
    @80Vikram 5 років тому +6

    Just curious from whom / which book did you learn React ?
    You're one of those rare breed of teachers who can explain complex topic is simplest possible way

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

    this was such an awesome tutorial. react was a blocker i frequently had working on my projects. i reviewed the video twice, just watching, not "copying" into my own project and then took on a new project and knocked the front end out within an hour. thank you sir, excellent tutorial.

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

      did u use his version of create-react-app or just used npx to make the app?

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

      @@alenjose3903 npx

  • @buddimalliyanapathirana1767
    @buddimalliyanapathirana1767 2 роки тому +6

    Despite this tutorial being outdated by 4 years , it's still one of the best React tutorials out there

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

      How much has changed? I never used React before. Does it still use classes with state and render methods?

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

      @@pranavrao6370 I see one difference now, with the introduction of Hooks the whole app is contained within a function instead of a class.

  • @saipavanmanda4424
    @saipavanmanda4424 6 років тому +4

    I am in love with the way you teaches the courses.Thanks for giving this free courses.Very helpful for people who cannot afford like me.Thanks you so much

    • @saipavanmanda4424
      @saipavanmanda4424 6 років тому

      Yes I do.But not this clear about the stuff going inside.

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

      Hi Saipavan! Yes, these courses are really helpful to enthusiastic coders who are looking to learn! Are you looking out for job opportunities in software dev currently?

  • @9607ankit
    @9607ankit 4 роки тому +37

    I really liked your Tutorial, Specially the way you cover every single details, like your keyboard shortcut keys, why you don't mentioned curly brace while importing React (As it is a default export) and why you install extensions and how to its work!
    Good Job Man!

    • @tkssharma
      @tkssharma 4 роки тому +1

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

    • @singhaditya3295
      @singhaditya3295 4 роки тому +1

      yes I liked the way to describe the things in very detailed manner

    • @faisalfida9929
      @faisalfida9929 4 роки тому +1

      React/Python Lover Come Here!
      Let's learn and practice together : discord.gg/vwgACw

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

      Hi Ankit! Are you looking our for job opportunities in software development currently? Please let me know if you are.

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

      @@singhaditya3295 Hi Aditya! Are you studying or working currently? Would you be interested in internships/jobs in software development?

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

    Best React tutorial on youtube. I''ve been watching Mosh tutorials for a long time ago and the conclusion is pretty clear: he's a great teacher

  • @alikhanmehboob610
    @alikhanmehboob610 4 роки тому +5

    Few days back, I started watching a bestseller react course from Udemy but after watching it's 4 5 sections I still felt that I am unable to understand react. Then I watched this crash course and WOAH. This course is building your base better than a best seller paid course. Thank you Mosh for providing all this content for free. :) God bless

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

      What was the best seller paid course's name?

  • @noorb374
    @noorb374 2 роки тому +6

    hi mosh, your way of teaching is amazing... plz make a new tutorial on react again, because a lot new features have released now ...like use memo hooks, use callbacks etc

  • @HotChilli99
    @HotChilli99 5 років тому +15

    Brilliant tutorial. I've done a couple of different React tutorials, and this is by far the best I have come across. I wasn't expecting that considering all of the other tutorials I have seen so far have been on paid subscriptions! Thank you very much, I feel like I have a decent understanding of React now, enough to get me going on a project!

    • @jesseguerrero8203
      @jesseguerrero8203 4 роки тому

      is it better than the freecodecamp React Native tutorial on UA-cam?

    • @sayandeepghosh2911
      @sayandeepghosh2911 4 роки тому +2

      @@jesseguerrero8203 yeah much better....i have done both

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

    Wow! Mosh! i'm just two minute and few seconds into your react crash course and I'm already giving a big shout out to the best react instructor ever on youtube.
    #CALEB from Lagos,Nigeria.

  • @krantinebhwani6125
    @krantinebhwani6125 6 років тому +4

    Guys he updated his full course, there's even more awesomeness in it I strongly recommend it :) The best thing about the course is I didn't only get much better at react, but also lot of great programming techniques, shortcuts, and thinking about how to put together an app.
    To mosh - thanks a lot for updating the course man, and upping my programming knowledge in general. I'm on a subscription even though I originally just needed the react course in to support you. But after I cover the rest of your updates to the react course I will start looking at the other ones I'm interested in too since i got your subscription anyway :P

    • @krantinebhwani6125
      @krantinebhwani6125 6 років тому

      Thanks that's fine, I reworded a little to make it more clear for other people reading lol. I just wanted to notify others that your course is EVEN better now and how much i gained from it beyond learning react.

  • @MikayilAbdullayev
    @MikayilAbdullayev 5 років тому +4

    Man, you're doing a really good job. And I really like the way you each time pronounce "Save the changeeeeees".

  • @donato_RH
    @donato_RH 5 років тому +21

    following this course was more exciting than a thriller. Never seen such clarity!

    • @leomaverick
      @leomaverick 4 роки тому

      I got you..

    • @Kayne1b
      @Kayne1b 4 роки тому

      I thought it was helpful, but I wish he hadn't back-tracked so much. If this had been my very first introduction to React, I think I would have been quite confused each time he does something just to undo it, or to do it a different way.

    • @tkssharma
      @tkssharma 4 роки тому

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

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

    I came here to get my feet wet with react thinking I knew JS and I am just blown away by the amount of stuff I've picked up about writing JS expressions and I'm not even half way though! my mind is melting. Thanks Mosh!

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

    I was going through the React course on Udemy and honestly I found it quite fast paced and I couldn't follow it properly. Now after watching this Tutorial, I have much more clarity on these concepts. Amazing the way you explain things!

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

      Hi Itish! Are you a student or working currently? Would you be interested in software development roles?

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

      Hey have you taken this course? If yes is it updated or old i . Asking because on the website it says that its last updated in 2020 jan so should i purchase it or not?

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

    First port of call for anything programming related is a tutorial by Mosh. This tutorial could be updated though - as I found a few issues but managed to sort it out with a struggle.

  • @Dapp_Daddy
    @Dapp_Daddy 5 років тому +22

    Mosh, you're a diamond at helping me catch up when i need to. Never stop, sensai!

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

    you are good at explaining reactjs i've been watching this tutorial for an hour now and i didn't feel the time passing

  • @andreyivanov6239
    @andreyivanov6239 4 роки тому +12

    This guy has such quality lessons, I'm so gonna buy the full course.

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

      ua-cam.com/video/6lB7f6nNS6U/v-deo.html. ..

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

      Im thinking of buying it too and i was wondering if its up to date. Can you please give me a feeback about the course

  • @kishanera1
    @kishanera1 6 років тому +11

    8:37 For windows users in visual studio code type Ctrl + , to open user settings to configure prettier formatter

    • @Lucas-zd8hl
      @Lucas-zd8hl 6 років тому

      This helped me!

    • @kishanera1
      @kishanera1 6 років тому

      Lucas M. I am glad!

    • @rpatel1212121
      @rpatel1212121 6 років тому

      i can't install react in "cmd"

    • @Lucas-zd8hl
      @Lucas-zd8hl 6 років тому

      Maulik what is the error message, and what did you write?

  • @MegaNicholasm
    @MegaNicholasm 4 роки тому +9

    For anyone getting an error around 1:23:23 where he changes count to this.props.value, you need to change the constructor to be like this:
    constructor(props) {
    super(props);
    }

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

    Followed along with documentation.. It took me around 10 hours to complete this video.. But finally I did it... I really recommend beginners to watch this. Shared you video in all of my whatsapp groups. Thanks Mosh Hamedani😍😚

  • @HarishKumar-pi2nb
    @HarishKumar-pi2nb 4 роки тому +16

    For those who sleep in all lecturing classes, you're gonna enjoy his fun way of teaching. He is a god in 'learn by doing' teaching.

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

      Hi Harish! Are you studying or working currently? Would you be interested in internship/job opportunities in software dev?

  • @AshrafulIslam-pm2mw
    @AshrafulIslam-pm2mw 6 років тому +10

    At last the long awaited course 🙂
    Thanks Mosh
    Your courses are always extra ordinary.

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

    Since my class/grade one, I've never interacted with a teacher like Mosh. I really like your tutorials. Be blessed.
    Right now I'm almost a Developer with Mosh tutorials

  • @HookPhire
    @HookPhire 11 місяців тому +1

    I'm so glad I found you, these tutorials are actually soooo good, and I'm actually learning rather than just copying. Thanks Mosh!

  • @pranavvij
    @pranavvij 5 років тому +10

    Brilliant brilliant tutorial. The tips in between are priceless!

    • @tkssharma
      @tkssharma 4 роки тому

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

  • @hemasaiprakash_chowta
    @hemasaiprakash_chowta 6 років тому +9

    The absolute worth of every minute Mosh!!! It takes you to the beginner level to Intermediate level. Thanks a lot for the course... Keep up the good work...

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

      Hey! Are you working currently? Are you looking for jobs in software development roles?

  • @sarmadrafique426
    @sarmadrafique426 2 роки тому +5

    4th Birthday of one of the best React course available on UA-cam. As a beginner you will find these things a bit messy. A good approach will be to learn ES6 modules and a bit of Object Oriented JavaScript. Because the new versions are coming so you might get stuck in installing the package and adding bootstrap. So the Solution is to add external bootstrap link and run command npx create-react-app react-app and then code along with Mosh Hamedani.

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

    MOSH MOSH you are magical and I have learn more and more about from your programing languages videos and they are quite smart and thank you so much!!!

  • @muhammadadil4885
    @muhammadadil4885 4 роки тому +8

    Thank you Mosh!
    This is the best React Tutorial I have came across. so simple yet cleared all the necessary concepts.

  • @ToastBubbles
    @ToastBubbles 2 роки тому +11

    Compatibility changes if you are using current versions of the software:
    Format on save:
    -Checkbox instead of inline code
    -You have to manually assign a formatter, search settings for 'default formatter' and set it to Prettier
    bootstrap syntax:
    -'badge bg-primary" instead of "badge badge-primary"
    Page stops working after elevating state around 2:05:00
    -this is because in newer versions of React, the main App.js declares the App as a function, in order to follow this tutorial, you have to revert it to a class by changing it to "class App extends Component" instead of function App. You also need to add a render() wrapper around the jsx return snippet at the bottom. I'm also a beginner, so this is probably not the right thing to do, but doing this will allow you to follow the tutorial.

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

      Thank you for noting this, I thought I was crazy and that I had accidentally changed my App.js, but nope, it really just is different.

  • @beryl.pretorius
    @beryl.pretorius 3 роки тому +96

    Please make an updated version of this course! It's so good but a lot of elements aren't feasible anymore :'(

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

      yes truee...im a lil confused bcoz of that :(

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

      Yes same here! I am unable to start my react. Does anyone know the solution?

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

      Any insights into what will break with the newest version of React? I don't feel great using an outdated version of the React library.

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

      @@smithmarta There are many more tutorials on youtube which might be helpful!

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

      @@samselvaraj8171 thank you, I found another great course here.

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

    watched the tutorial without practicing, and it was so amazing, finally decided to begin practically at around halfway, ran into various problems trying to run the old react/bootstrap versions from this tutorial (react 1.5.2 and bootstrap 3 or 4, I think?) and used the latest (as of this comment) versions instead (react 18.2.0 and bootstrap 5). ran into some inconsistencies, but after fixing those problems, I am back on track!
    the tutorial is very well done in such a way that if I run into problems due to the version differences, I still have an idea on how to go about fixing it. Thank you!

  • @thesimas42
    @thesimas42 5 років тому +12

    if someone is having problems with npm start part - install the newest version of create-react-app. Worked for me

    • @annsway
      @annsway 5 років тому +4

      This link will help with the version problem: stackoverflow.com/questions/59188624/template-not-provided-using-create-react-app

  • @vadane1
    @vadane1 5 років тому +4

    One of the best tutorial for learning react on Internet today

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

      Hi Ajinkya! Are you a student currently or working? would you be interested in opportunities in software development?

  • @mikkeljrgensen3850
    @mikkeljrgensen3850 5 років тому +34

    43:38

    • @mikkeljrgensen3850
      @mikkeljrgensen3850 5 років тому +4

      @@programmingwithmosh I'm not much of a SoMe person (youtube only), but I will guarantee you a slot on the "recommended" tab of my site and I will, of course, recommend you to anyone with whom I discuss coding and tutorials in the future :)
      Update: After a bit of consideration, I've decided to buy the entire course. That's a definite first for me as I'm the most stingy man alive. It's well worth it and at a very favourable price; good quality deserves recognition.

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

    The teacher usually gave us a wrong example and then correct it afterwards, that makes me sometimes just remember the wrong way of writing it...
    It would be better just show the right way at the beginning and then show if u do in this wrong way what will happen, or for a time sake, just not show the wrong way. :)
    in general, it is a good course, I do the exersice while watching it. thank you so much !

  • @DaveTheDeveloper
    @DaveTheDeveloper 3 роки тому +10

    For everyone who has the same problem like me
    with having no template files and cannot start it. This is because
    the version Mosh is using is outdated an React isn't providing templates
    for this version anymore. You have to install a newer version.

  • @austincharlesserio9357
    @austincharlesserio9357 5 років тому +20

    Wanted to clarify an issue with create-react-app and npm start. At this time, the method of installing create-react-app is no longer supported as this tutorial uses the older global installation method. The documentation says "If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version" - create-react-app.dev/docs/getting-started. If you are having trouble, run the uninstall command, and make your react app using "npx create-react-app my-app". Then. cd to the directory as explained in the guide and npm start will work as expected.

    • @ikennaifekaonwu6015
      @ikennaifekaonwu6015 4 роки тому

      Thank you very much for this, I have been battling this stuff for ages, I just did as you said and it worked perfectly.

    • @arariks
      @arariks 4 роки тому

      Great info. Thanks !!!

  • @amardeepagrawal6188
    @amardeepagrawal6188 4 роки тому +9

    I can say now, Learning react was fun and made super easy by you. Thank you for teaching us !

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

      ua-cam.com/video/6lB7f6nNS6U/v-deo.html..

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

      Hi Amardeep! Are you studying or working currently? Would you be interested in opportunities for software developer roles?

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

    I love you Mosh. After several trials on platforms like Codecademy, Udemy and not understanding anything, you break it so simply and now I finally get programming. Thanks so much for what what you do

  • @dudebroepicgamer4847
    @dudebroepicgamer4847 4 роки тому +86

    Fantastic tutorial. Thank you for this.
    Also... Drinking game: take a shot every time he says "save the changes."

    • @apgnisehs3536
      @apgnisehs3536 4 роки тому +11

      or every time he says "beautiful"

    • @twisterrjl
      @twisterrjl 4 роки тому +4

      or just type: true && "hi" and you get hi
      Ba-dum-tss!

    • @choi-r7108
      @choi-r7108 4 роки тому +9

      "Back to the browser"

    • @guitarman813
      @guitarman813 4 роки тому +2

      "Lemme show you..."

    • @genie365
      @genie365 4 роки тому

      Thank you, you have helped me hit the Ballmer Peak.

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

    I really like how u explain all things...."Plssssssss MAKE A NEW SERIES ON ANGULAR"..

  • @lesleyshome
    @lesleyshome 5 років тому +5

    completely watched this tutorial..covers all the necessary basics of react..Also please do video for Redux in React..Thank You Mosh..

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

    35:11 Command + D(on Mac) can edit the same selections ( multiple cursors ) in one go, SUPER HANDY ! Thanks Mosh !

  • @caroldanvers265
    @caroldanvers265 6 років тому +22

    This is an awesome course. You made it seem so easy to understand.

  • @aarcheeecya
    @aarcheeecya 5 років тому +12

    Wow, I love Mosh, he is one amazing teacher, i have learned Angular 60ish minute video(2 years ago and that helped me to become an Angular js expert now).
    Have learned Modern JS concepts and amazing React Hands on introduction from him. Such a great work Mosh! And such a big help to dev like us. Thank You So much :)

  • @jaymenluther5768
    @jaymenluther5768 4 роки тому +6

    Something I noticed when going through the tutorial (which has been awesome!) if you are using a constructor to bind like he is explains, when you get to the passing data to components section, you will need to pass props into your constructor and also super().
    constructor(props) {
    // calling parent constructor first
    super(props);
    // we need to bind the handleIncrement function in order to gain access to "this" otherwise when you call "this"
    // within the function, it will not know to reference itself
    this.handleIncrement = this.handleIncrement.bind(this);
    }
    Atleast this is what I did in order to get my count to update with this.props in the state. At any rate. Awesome tutorial thanks so much!

    • @dereckchamboko9160
      @dereckchamboko9160 4 роки тому

      Thanx man, I had found a workaround though.
      constructor(){
      supers);
      this.handleClick=this.handleClick.bind(this); // binding in constructer as was shown by Mosh
      }
      setProp(){ // created a set prop method
      this.state.count=this.props.counts;
      }
      render() {
      this.setProp(); // called my setprop method inside render method

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

      Jaymen is a great name!!

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

    Very clear and consistent course! Did have no single question. Thank you!

  • @akshatarora7736
    @akshatarora7736 4 роки тому +10

    I just skimmed through understanding what we will talk about, he says this is for beginners but it looks like he's gonna make us all pro. Thank you so much Mosh! I even use your udemy courses.

    • @MukeshKumar-co5ky
      @MukeshKumar-co5ky 4 роки тому

      is this tutorial outdated?

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

      @@MukeshKumar-co5ky he added a section for new/advanced react stuff

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

      @@EZboyrocks mind asking, where can i find that latest tutorial?

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

      @@nurfarihasalam5370 it’s on his website, you need to pay for the full course

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

      @@EZboyrocks ohh i see. thank you!!!

  • @ExploringWorld100
    @ExploringWorld100 5 років тому +12

    Appreciated the highly recommend React.js video. I was searching lots of react.js video on UA-cam getting the pure clean concept but I din't. Finally from this video I gained every information about react that helps to me learning real React.js concept. Thanks a lot for such an excellent video. This react tutorial is ever best among all other. I am watching from Frankfurt university of applied sciences, Frankfurt, Germany.

    • @tkssharma
      @tkssharma 4 роки тому +1

      Watch 1000+ Tech Videos from My channel talking about Everything in Javascript
      Here is the playlist for React JS
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

    • @faisalfida9929
      @faisalfida9929 4 роки тому

      React/Python Lover Come Here!
      Let's learn and practice together : discord.gg/vwgACw

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

    This is by far the easiest JS tutorial I've ever watched.

  • @f_1289
    @f_1289 8 місяців тому

    Thank you for such an awesome inclusive course!!!
    for anyone having any issues, the versions Mosh is using are outdated. if your using newer versions, check what corresponds to your line in your version.

  • @pratikmhaske5792
    @pratikmhaske5792 4 роки тому +4

    The code at 1:00:53 and code at 1:03:10 are totally different, took me an hour to realise ! What a bummer should have atleast told us he is using old code

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu 5 років тому +35

    Going to watch all the adds through, just for this guy. :D

    • @ClientAcquisitionWithBilal
      @ClientAcquisitionWithBilal 4 роки тому

      You can use ads blocker brother :D

    • @amratanshu99
      @amratanshu99 4 роки тому +5

      Can't imagine life on UA-cam without an AdBlocker brother.

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

      @@amratanshu99 Hi Amratanshu! Are you a student currently or working? Are you looking out for software developer roles ?

  • @ThaOrangeBlues
    @ThaOrangeBlues 5 років тому +178

    at 1:15:59, when you typed () => this.handleIncrement(product) --> gave me undefined and didn't work. I got it to work with product => this.handleIncrement(product) which solved the problem.
    and this is the function:
    handleIncrement = product => {
    this.setState({ count: this.state.count + 1 });
    };
    so I don't know if did anything wrong before that, that I got undefined for the prodcut parameter passed to the function

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

    Before I finish watching this video I have to write a comment for you !!!! You make my learning full stack development journey so much fun and easy. Thanks Mosh!!!!!

  • @maliklarsen
    @maliklarsen 5 років тому +4

    Thank you Mosh. You are my hero. I Love your tutorials. I plan to by more of your courses, I like the way when you describe and explain everything in your tutorials, you are the best. I'm a big fan of your teaching. keep the good work. I learned more from you than from my 6 and a half at university. Thank you, again.

  • @dereckchamboko9160
    @dereckchamboko9160 4 роки тому +9

    Hi Mosh, amazing tutorial right there, been following it from the beginning. However i noticed on "1:21:18 Passing Data to Components" if you are using the version v16.13.1 or any version higher than the one you are using, u will get an error "Undefined prop". the fix to this is defining a constructor and passing props and and argument and in the constructor define super and also pass props as an argument => constructor(props) {
    super(props); }

    • @lfcrab0
      @lfcrab0 4 роки тому +1

      A great help! thanks alot!

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

      2 years later you are still helping people! thanks

  • @LucasSantos-wp7ji
    @LucasSantos-wp7ji 3 роки тому +3

    This class is exceptional! Wish I could learn every technology like this. Thank you very much!