React JS Crash Course (2019)

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • In this crash course you will learn what React JS is and the fundamentals such as components, state, props, JSX, events, etc.
    Modern React Front To Back - 13.5 Hour Course
    www.udemy.com/...
    Code For Tutorial:
    github.com/bra...
    💖 Become a Patron: Show support & get perks!
    / traversymedia
    Related UA-cam Videos:
    Redux Crash Course - • Redux Crash Course Wit...
    React Context API Project - • Lyric Search App With ...
    React Hooks - • Introducing React Hooks
    Learn The Mern Stack - • Learn The MERN Stack [...
    Website & Other Udemy Courses
    www.traversymed...
    Follow Traversy Media:
    / traversymedia
    / traversymedia
    / traversymedia

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

  • @TraversyMedia
    @TraversyMedia  3 роки тому +30

    This is the 2019 version which uses class based components. The 2021 version with hooks has just been released - ua-cam.com/video/w7ejDZ8SWv8/v-deo.html

    • @NinjaAhmed-cp3pe
      @NinjaAhmed-cp3pe 3 роки тому

      first reply

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

      which one should I watch first. Please reply

    • @NinjaAhmed-cp3pe
      @NinjaAhmed-cp3pe 3 роки тому

      @@abhishekmaira9769 not this one

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

      @@NinjaAhmed-cp3pe can you please explain why? ... doesn't this use basic class-based components. Sorry I am a beginner and wanted to know which video to start with first

    • @NinjaAhmed-cp3pe
      @NinjaAhmed-cp3pe 3 роки тому

      @@abhishekmaira9769 watch the 2021 one

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

    Hey there Brad,
    just one note- DON'T apologise for the length. you're not a waffler or a rambler, this 1.5 hour tutorial was 99% useful information so even if it was 3 hours long most people (including and especially me) would watch it without fretting about the length due to the value
    Your crash course was informative and intuitive with complicated things made simple. When you were about to do something, I would try to do it myself first and then I would come back and see your solution which is why it took me a whole day to get through it!
    you helped me get into web development and i'm happy to keep consuming your content, thank you very much Sir

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

      100/100 true i was wondering why he is excusing giving us a great lesson

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

      +1 Please, don't apologize, Brad. You're doing a great job!

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

      I agree, it takes time to learn these sorts of things and it is something that cannot be rushed. Thanks Brad

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

      Word

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

      1.25x or 1.5x is sufficient

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

    Thought I would share this...
    # Creating Class Component
    20:48
    # State
    22:52
    # Passing State as Prop to Component
    24:57
    # Looping through props and output
    26:17
    # Adding key to list item
    31:19
    # PropTypes
    31:56
    # Style components
    34:07
    # Add style to a method
    35:46
    # Why arrow functions and .bind(this)
    41:33
    # Component drilling
    42:26
    # Passing props through methods using component drilling
    45:57
    # Deconstructing
    46:35
    # Updating state through a method
    47:57
    # Toggle state
    49:18
    # Submit events
    1:09:21
    # React Router
    1:15:30
    # Links
    1:23:29
    # Http GET request
    1:25:56
    # Http POST request
    1:30:12
    # Http DELETE request
    1:32:51
    # Adding PropTypes
    1:34:31

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

      thanks for this

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

      you absolute unit! loveya.

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

      One of the best comments in UA-cam history.

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

      Thanks a lot! Just in the # Http GET request, it is not 1:23:56, it's 1:27:56. Although IMHO there should be a section before this one because he explains about the Axios library at 1:26:53.

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

      Oh god thanks god for this comment !! you added as much value as the video it self ! you r the best dude !

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

    import GreatCrashCourse from './TraversyMedia'
    export default HitLikeButton

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

      Awesome! :)

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

      ; important
      import GreatCrashCourse from './TraversyMedia';
      export default HitLikeButton;

    • @AjayKumar-ts5jd
      @AjayKumar-ts5jd 4 роки тому

      where can i refer for shortcuts like core css codes directly. i am beginer !

    • @AshuSingh-us5tp
      @AshuSingh-us5tp 4 роки тому

      So basically HitLikeButton is the name of class otherwise it'll give error

  • @neenaw
    @neenaw 4 роки тому +359

    If you have a problem with uuid do this:
    import { v4 as uuidv4 } from 'uuid';
    id: uuidv4()

  • @johnniestang
    @johnniestang 4 роки тому +21

    At 20:04, Emmet magically works with JSX :)
    I had to look this up so it may be helpful to others as well ...
    To get emmet to work with JSX, do the following:
    - Open Settings ( ctrl + ,)
    - Go to Workspaces
    - Select "emmet"
    - Select "Edit in JSON"
    - Add the following:
    ```{
    "emmet.includeLanguages": {
    "javascript": "javascriptreact"
    }
    }```

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

      Thanks man!

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

      This worked. Thanks dude !

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

      Thanks for this

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

      This is why I love internet, people are really kind here.

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

    The checkboxes should match whether the todos are completed. To achieve that, update the render method in TodoItem.js like this:
    const { title, id, completed } = this.props.todo;
    ...

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

      Good observation!

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

      Thank you! I was trying to figure out how to fix that!

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

      and add this in checkbox

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

      ​@@kifahandary8126 I think we wont need that since we are getting the checked information from App.js and it works without doing so, would appreciate if you give details about why to use that line?

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

      I was trying to figure out the same thank you :)

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

    An expert teacher who's words are priceless, spending so long to try and explain in such a beautiful manner and then apologizing for taking long. You are a hero ! I am starting to love React after I have seen this video. There were so many barriers in me learning React, so much scattered information but this video is one stop shop

  • @marklholloway
    @marklholloway 4 роки тому +121

    Me: Clicks this video
    Ads: You’re wasting your time watching online coding courses
    Me: Skips Ad 😀

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

      you should watch the AD that's how he get's paid :)

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

      @@EmekaMbah gr8 thought

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

    28:33 - An amazing extension being used here.
    Thanks a lot for the tutorial. Helps me a lot! I keep coming back to refresh anything that I missed.
    Below bookmarks have been commented by @Mukesh Kumar. Adding these to your description would be very helpful for people trying to navigate quickly through the tutorial.
    9:41 Start learning React (Introduction)
    11:15 Install Node.js
    11:34 Install React Dev Tools
    11:45 Github page for create React app
    12:05 Create
    20:48 Creating Class Component
    22:52 State
    24:57 Passing State as Prop to Component
    26:17 Looping through props and output
    31:19 Adding key to list item
    31:56 PropTypes
    34:07 Style components
    35:46 Add style to a method
    41:33 Why arrow functions and .bind(this)
    @ Component drilling
    45:57 Passing props through methods using component drilling
    46:35 Deconstructing
    47:57 Updating state through a method
    49:18 Toggle state
    1:09:21 Submit events
    1:15:30 React Router
    1:23:29 Links
    1:25:56 Http GET request
    1:30:12 Http POST request
    1:32:51 Http DELETE request
    1:34:31 Adding PropTypes

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

    Great course:
    56:28 : no need for the [... this.state.todos.filter ...] since the filter method will automatically return an array. You're deconstructing then reconstructing the array -> it's redundant.

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

      I was having trouble understading this, thanks for the explanation

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

      I was wondering about this as well. Was the intention of using spread operator is to make a copy of the array, rather than modifying the existing one?

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

      @@WayneSzeto yes

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

      @@WayneSzeto So what would be the downside of modifying the existing array?

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

    I have a bachelor's in Web Development and Design and I think I've learned/retained more from this video than I did from my course on React. Very well done, man!

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

      Bachelor's in Web Development and Design? Is that even a thing?

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

      That doesn't exist kid

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

      @@l2ob1222 some universities in my country offer a Bachelor in Web Development so i wouldn't discredit him

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

    Traversy Media, Thank you for this video, a great start for those venturing into ReactJs.
    There is one important point you did not bring up concerning state is that of immutability. The react framework rely, at least in part, on state changes being new objects, not the same objects mutated. The place you make a mistake is at 49m. The todo will be mutated by the act of toggling the completed property, which means that even though map returns a new array, the old array will have a mutated element, the todo object being changed. The markComplete can be changed in the following way to support an immutable update:
    markComplete = (id) => {
    this.setState({ todos: this.state.todos.map(todo => {
    return todo.id !== id ? todo : { ...todo, completed: !todo.completed };
    }) });
    }
    This uses the ternary operator and reversed condition, but it is equivalent. The important difference is in the object literal where the spread operator is used on the todo object. This creates a new object with the same properties and associated values as the prior todo object. The extra completed property takes the place of the property from todo since it comes later in the object literal.
    For more complex data structures, either simplify the structure, or use one of the available libraries for handling data in an immutable way. The ReactJs documentation has some suggestions.
    On a similar note, at 56m25s, the return value of filter is a new array, and since no element is actually changed the spread into an array is superfluous.

    • @Sp4rks
      @Sp4rks 5 років тому

      this should be upvoted, great point

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

      Great observation and correction! So often I see people point out when something is wrong, but offer no alternative solution.

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

      Why does React Framework rely on changes to state objects being new objects?

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

      @@lasithk5914
      1) Reacts wants to know which components have changed their state and props to avoid re-rendering everything. (see React.PureComponent)
      2) You can implement Undo-Redo easily.

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

      3) If there are multiple setState calls coming one after another Reacts merges state changes and re-renders the component only once.
      This is the reason why Roger Norling's example is also unconventional.
      You shouldn't copy this.state directly.
      Instead, pass a callback:
      markComplete = (id) => {
      this.setState((prevState)=> { todos: prevState.todos.map(todo => {
      return todo.id !== id ? todo : { ...todo, completed: !todo.completed };
      })
      });
      See:
      reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous

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

    There's no way I learn a new language without watching your videos first!

  • @sk32md
    @sk32md 4 роки тому +58

    BEFORE YOU START
    npx create-react-app todo --scripts-version 1.1.5
    BEFORE YOU START
    so you have classes instead of functions and can follow along the tutorial
    on VSCode you can also run react pure to code extension to convert if you are running this is 2020
    thanks to Chad C. for the info

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

      Thank You! I've been trying to figure out how to switch version so I can follow along, I was on the verge of giving up! This is very useful

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

      Thanks this was really helpful

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

      Thank you man... wasted too much time on this before i saw your comment

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

      Siamak you're one beautiful son of a bitch

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

      After an hour surching for a solution I stumbled upon Mr Kosari. Much obliged!

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

    Thanks Brad. I believed you when you told me what I needed to know in 2019 / 2020 to be a web developer - I listened to you religiously. I didn't even have access to internet at home, I would download your videos on my laptop in the dairy queen parking lot that had wifi and play them on repeat at home. Anyways, I'm now 3 months into a 6 month contract doing front end web development at a rate I thought I would need years of experience to get, and finally have the confidence to start applying to full time positions. THANK YOU!!!!

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

    Dude, that was intense! Great tutorial. Walked in not knowing anything about React, left like I have learned a shit load. Thank you!

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

    Brad, you are a magnificent beast.

    • @ironplank
      @ironplank 5 років тому

      Ikr

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

      The best good guy brad on the planet

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

      To be completely honest, I am really scared of him because of how good he is at coding. I guess at least he is using his powers for good.

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

      Leslie at it again?

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

    For Windows users, if you are unable to npm create-react-app then you can use :
    "npm install -g create-react-app
    npx create-react-app"
    I ran into trouble and those two lines solved the issue.

    • @aleem.akhtar
      @aleem.akhtar 5 років тому +7

      May be for experienced programmer, this solution will not have any worth. But for me, you sir, just saved my day. kudos

    • @amandayi5011
      @amandayi5011 5 років тому

      nodejs8.0+ is OK every

    • @kylemarsh4467
      @kylemarsh4467 5 років тому

      Thank you!!!

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

      Thank you so much, was tearing my hair out at this

    • @irvansyahroni3508
      @irvansyahroni3508 5 років тому

      thanks alot!!

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

    For those that are struggling cos can't access the props because you are using function component instead of class component, you just add a parameter to the function component, what I mean is:
    function Todos(props) {
    return (
    props.todos
    );
    }

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

    simply amazing, only thing i would say is maybe do a functional version. This is because create-react-app now comes with "function App()" as boiler plate instead of "class app" like before.

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

    I spent 6 days trying to figure out this whole tutorial. Now I finally did it in 40 minutes without seeing anything

  • @deadli-us
    @deadli-us 4 роки тому +5

    As an experienced web developer coming from a Backbone+Marionette background, this was the perfect introduction to React for me. Thank you and great job!

  • @faisalm.2663
    @faisalm.2663 5 років тому +6

    Brad common man, You don't need to apologize about the length of this crash course - This has been so far the most informative crash course I've ever taken. THANKS A LOT 🙌

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

    I'm several weeks into the Udacity NanoDegree Program for React and have been pretty frustrated and lost but... I feel like I just learned more in the last 90mins from Brad than in the month I've been doing Udacity. Bless you sir. So glad I found your channel!

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

    Just finished your excellent React Tutorial. It was the first video on React that I could actually make it to the end with the code intact and working! I so appreciate you taking the time to explain all the parts. This tutorial really helped me.
    Thank you ! !

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

    You are reading my mind Brad! Was just thinking of starting off with a framework which most likely will be React now in the new year, and here you are! Been following your channel for almost a year now, learned a lot from you! Bought the modern javascript udemy course from you, learned tons of new stuff. Will start looking for an entry level job or an internship next week, but given that I haven't yet started with a framework, this is right on spot. Happy new year and all the best!

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

      Same :)

    • @cookiezillaz
      @cookiezillaz 5 років тому

      My boy Brad is a real life wizard

    • @arrdee8558
      @arrdee8558 5 років тому

      Same!

    • @jakub7048
      @jakub7048 5 років тому

      same here, Brad is cool

    • @bestibitoyerotimi9798
      @bestibitoyerotimi9798 5 років тому

      Lol, he also reads my mind too. He knows what his students need at the right time. That a teacher!

  • @antoinekaram2910
    @antoinekaram2910 4 роки тому +28

    I would personally see this course sold for money, thank you for giving it to the community for free

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

    Omg you are the real MVP, just started learning React on fcc but its boring to read and read... Thank you this will help to do a second part in your MERN stack course on udemy!

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

    Couple of years already coding along you and your tutorials Sir, wouldn't be here without you. Thank you.

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

    Man. I remember I started learning web dev last July. I began by watching your HTML only "landing page" tutorials over and over again until I memorized how to do them on my own without watching the videos. I would watch these other vidoes: project with node.js, express, mongo... etc. and I would think omfg wtf is that? I then did a JS course and now, a few months later, I'm working on learning node.js and I know what all that stuff is now lol. In a few months I'll be more than job ready : )

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

    If you're having issues following along with the tutorial (like I was) because in the video it shows classes using the extends declarations versus the newer syntax which uses functions. Just type: npx create-react-app . --scripts-version 2.1.2
    This creates the scripts with classes

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

      THANK YOU!!!! starting over (dangit!!!!)

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

      oh my god you are a fucking angel THANK YOU.

  • @jaggyjut
    @jaggyjut 4 роки тому +31

    please note that uuid has changed their declare, this one works for me:
    import { v4 as uuidv4 } from 'uuid';
    id: uuidv4()

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

      Thanks!!

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

      Thanks !!

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

      Thanks !!

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

      or you can just use import * as uuid from 'uuid', and then use uuid.v4()

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

      Dude, I've spent like 30 minutes looking online, why don't you put it on
      stackoverflow.com?

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

    Sir please don't say sorry again and again for time, every single second was worth it. You r an awesome instructor sir,keep creating awesome tutorials😋

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

    You guys at Traversy Media are helping me in my current boot camp more than you know! Thank you! The way you explain and walk through each step helps me understand HOW to use and understand (understand being the key word really) how this all ties together and works!

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

    I love this course because it gets straight to the point. It doesn't start with 50 minutes of introductions or explanations about why React is changing the world with speakers from Facebook and other nonsense that way too many courses have. This is the first React tutorial that didn't want to make me pull out my hair from the ridiculously slow pacing and nonsensical padding with nonsense that has nothing to do with learning React. Kudos to everybody involved.

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

    pro tip: speed up the video(most educational videos) to 1.25X , it makes the videos faster so you can watch more videos in a session.
    this video was extremely helpful!

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

    please never apologize for any of your videos to be "really long" - it was worth every minute - gonna take your Front To Back MERN stack course now

  • @fabricobjects-llc3581
    @fabricobjects-llc3581 5 років тому +8

    I am a student of yours on Udemy. I am taking your MERN stack course but I haven't started yet because I am taking some prerequisite stuff. I will add this to my prerequisite list. Thank you!

    • @YaSir-uc6vl
      @YaSir-uc6vl 5 років тому

      thankyou so much brad how can i thanks to you? you are brilliant

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

      Hi Fabric, how did you like the MERN course? Am thinking of taking it next?

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

      @@fabricobjects-llc3581 Thank you ! Will check it out, good luck in the course!

    • @fabricobjects-llc3581
      @fabricobjects-llc3581 5 років тому +1

      @@eeeeee4756 I updated my reply to you to show some playlists that I use. For some reason the Academind playlist page doesn't show all his playlist; you have to use the page search function to see all of them. Good luck to you too!

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

    This tutorial was superb. This is the first tutorial that I have actually watched until the very end. It had all the essential informations. You are the best.

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

    I've been struggling with React for awhile now. I mainly work with Python in back-end code. My company uses React and React Native though and I'm trying to expand towards Full-Stack Development. I spent a long time going over their React code thinking I would be a quick study but not so much.
    Your intro to this video made me realize I needed to improve my ES6 skills so I spent about 6 hours going over Deconstructuring, High Order Array Methods, AJAX and Fetch API. That information alone boosted my confidence and understanding quite a bit.
    The rest of your video was the clearest and best explanation of React that I've been able to find. I'm still a bit confused about "Climbing the tree" but I understand the basics now and I plan on going through your video again before setting off to create my own React App.
    Thanks!!!

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

    Nice job man, very good tutorial! Somehow it is really easy to understand.

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

    Thank you very much sir. I started studying react few weeks ago. This came at the time I needed it the most.

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

    This is awesome.
    This is my first step to learn react, and now im not so intimidated. Huge thanks !

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

    Got atleast 90% more clarity on everything. Awesome course, absolutely no flaws.

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

    thank you so much! I started my Vue.js some time ago with your crash course, and now I start React. Building same app with both Vue and React really gives me more insight into their differencies and similarities and what I find more comforatble for myself.

  • @locktar-o-dark5664
    @locktar-o-dark5664 5 років тому +5

    thx for work, Brad
    this.setState({todos: this.state.todos.filter(todo => todo.id !== id)})
    not need wrap in an array so like method filter() return array

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

      That was driving me crazy! :p

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

    You deserve more subscribers and more views.
    Thankyou for producing such informative and enjoyable content.

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

    Thank You SOOOOOO much.. I listened to every word and every detail
    A big THANK YOU from your biggest fan in Syria

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

    Brad makes and awesome tutorial, taking his time to explain every little detail in a clear and concise way, and all for free and he proceeds to "apologize for taking so long". hahah. No buddy, THANK YOU for your hard work. Awesome video. I learnt a lot.

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

    Long?
    Bro this was the most substantial React video I have seen.
    It is equal to 3 hours if another person would have done it.
    So many things I appreciate with your videos, but I can sum it up as that I really like that you are talking about the subject and not anything else (in a really good pace).
    Thanks man, I am gonna try using react for my project

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

    great course and explanation, love it.
    For those of you having issues with importing the Router just do:
    npm install react-router-dom --save-dev

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

    I just finished your MERN stack on udemy today, keep up with great content !

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

    For those who are seeing functions instead of class in app.js, use following command to create app
    npx create-react-app my-app --scripts-version 1.1.5
    Creadits: Chad c

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

      THANK YOU! There is more than one teacher at Traversy Media. It takes a village.

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

      Thank you; I spent awhile trying to figure out a solution to that on stackoverflow, and here it was the whole time.

    • @AjayKumar-ts5jd
      @AjayKumar-ts5jd 4 роки тому

      where can i refer for shortcuts like core css codes directly. i am beginer !

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

    Perfect diction and pace, Brad... As an experienced developer who just wanted the meat of ReactJS, thank you very much

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

    If your doing this is 2020 and running into errors even if your syntax is perfect, I suggest looking here in the comments section for updates and tips. Fantastic Tutorial! Very dense and packed with information. I was expecting just to watch , but it became so interesting I ended up following along :)

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

    Appreciate you putting these tutorials together. These are too helpful ✊🏽

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

    Can you make an updated crash course using the functional style?

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

    insteaf of uuid, you can use Date.Now() to create an id

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

    Going through this tutorial in May 2020 !! Great as always !
    Somebody might have some issues though !! Here's what you need to do !
    Do the following changes:
    create-react-app's newest version doesn't install App as class component, but as a functional component. I'd suggest rewriting it as shown in the video(the class component version)
    For uuid,
    import {v4 as uuid} from 'uuid';
    Instead of uuid.v4(), use uuid();

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

    Amazing tutorial, if you are watching this with the newer versions of react, just copy the class code from Todos and modify App.js so that your app becomes a class

  • @tarikouazzanitouhami2729
    @tarikouazzanitouhami2729 4 роки тому +7

    On windows with visual code studio:
    1- Download and install Git
    2- Download and install Node.js
    3- Go to vs code terminal and check if everything is installed by doing the following:
    to check that everything is installed you should check the version of each installation: "git --version" "npm --version" "node --version"
    4- type "npm install -g create-react-app" in your terminal to install react
    5- Now you can create your react project by typing: "create-react-app "
    Followed the instructions in this webpage: makandracards.com/reactjs-quick/52419-install-reactjs-windows

  • @Quuton
    @Quuton 3 роки тому +30

    pro tip: 1.25x speed is barely any difference and makes you not have to spend so much time :D

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

      That tip got no use coz i can already understand at 1.75x speed 😂😁

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

      @@neillunavat bruh! :D :D

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

    im switching to react from vue, Although vue is great and easy to learn i couln't find any jobs, i live in a 3rd world country and its hard to land one as a free lancer, so im going to learn react for now, thanks for the free course always awesome content.

    • @brunoluan2149
      @brunoluan2149 5 років тому

      Jose, we're not 3rd world country. Don't put us on this low level.

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

      India is third world....Mexico is right next to USA...just jump the fence

    • @rahmatgo1067
      @rahmatgo1067 5 років тому

      +I'm a Developer im from southeast asia more 3thrd world country, they pay us 300 USD /month as web developer

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

      Just an fyi 'Third World' actually means a counry that was neutral during the cold war...

    • @EriAirlangga
      @EriAirlangga 5 років тому

      why not freelancing online?

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

    Really awesome tutorial! I used React over 4 years ago, but have since been a backend engineer and my React knowledge quickly went rusty and extremely outdated. Clearly a lot has changed in a few years. Thanks for going through all this at a nice pace that I can actually follow. I watched some other tutorials out there that try to teach React in 30 minutes or even 5 minutes and they were absolutely useless.

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

    19:14 - basic clean-up
    1:05:35 - input field functionality
    1:08:41 - onChange for multiple fields

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

    Awesome. Plz make updated redux crash course

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

    "...Try to explain everything I do rather than just a watch-me-code video."
    Thank god. As an up and coming software engineer, I am bothered whenever people tell me to just 'type it in, it works. we'll teach you why some other time." I must know the how and why to everything I type in.

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

    Holy shit I have never seen a better tutorial in my life! You are a life savior and I wish the best to you, I hope you continue to make these amazing tutorials. And the amount of information you crammed into only an hour and a half is incredible! Thank you so much :)

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

    This is a fantastic tutorial. Some little things have changed - react App.js component starts now with a functional component boilerplate and axios importing is little different. But in general - it is a fantastic tutorial. Thanks!

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

    FYI - App.js now has "function App()" rather than "class App" because it doesn't need the lifecycle methods. The tutorial used an older version of React.

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

      This is where I'm getting hung up, I stored the state in Todos component but now I'm having difficulty passing the data from AddTodo -> app.js ->TodoItem...

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

      @@derekdenhartigh3747 React sucks. Check out Svelte svelte.dev

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

      @@derekdenhartigh3747 import React from 'react';
      function Todos() {
      return (


      Todos


      );
      }
      export default Todos;

  • @bonchan4404
    @bonchan4404 4 роки тому +64

    Actual tutorial : 1 hour and 38 minutes ,
    me : 5 hours
    but still JARGON to me , need to watch this again tho ahahaha

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

      If you haven't already you should go through his 'Node.js crash course' then 'Express JS crash course' then come back to this one.

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

      This course is perfect.
      But, if you don't understand you can try Mosh's React for Beginners. It's slow paced and really beginner friendly.

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

      same

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

      @@@MrPacalicious do we need to know node.js before learning React?

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

      @@katheyjohn93 no but i found this easier to understand after going through a node.js course

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

    idk why but i find his voice particularly charming

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

    This video made me see the bigger picture. After 6 years of diverse programming experience, I finally realized that front end development isn't as annoying as I thought.

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

    Your channel helped me more than any other instructor's tutorial, I'm using React Router and I was touched when I clicked the menu 'About' and showed up the contents. Thank you so much.

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

    *DEPRECATED UUID FIX* - if you get stuck here 1:14:46 at UUID, note this:
    ```
    const uuidv4 = require('uuid/v4'); //

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

      Thank you for helping us :)

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

      @@edwardtofan8783 ironically I'm having a very tough time with React. I'm pursuing VueJS instead BUT One time I was taking an EJS class online and there was an outdated framework in the class. One of the comments had a fix for it and it was a lifesaver. I happened to figure this out and figure that I wouldn't be the only person with the same problem so I'm thrilled if it actually worked for you.

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

      Thank you for fully spelling it out for us :))

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

    A big thanks for providing this tutorial. It helps a lot.

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

    Around 1:15:21 I was getting an error "Attempted import error: 'uuid' does not contain a default export (imported as 'uuid')" because uuid package used to have default export but it no longer does. To get around this in the import write it as
    import { v4 as uuid } from "uuid";
    and then you can use it as
    id: uuid() when assigning the id property

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

    eventhough I had no idea what was going on in the last 30 mins, this was a pretty good tutorial. The code here will be helpful for future references as it covers a lot of concepts in React

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

    Awesome crash course for someone starting in React. It tackles everything essential for a basic app. Thanks for making this vid!

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

    I'm so mad at my self, I've been doing hardcore JavaScript for so long my CSS skills are horrible.

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

      I have the course for you coming out very soon :)

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

      @@TraversyMedia what's your courses in 2019 brad

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

      check semantic UI. Its really cool and easy. check this step by step guide. videotutorialspot.com/2019/01/08/semantic-ui-for-react-install-and-getting-started/

    • @snoot_loops599
      @snoot_loops599 5 років тому

      Semantics UI is no longer being supported. I would still recommend using Bootstrap at this point.

    • @kmz16
      @kmz16 5 років тому

      and what about tachyons? I've been styling some things with tachyons.

  • @geraldgeraffe2209
    @geraldgeraffe2209 4 роки тому +23

    "Oh I forgot the s."
    Broswer

  • @The_Soup_Master
    @The_Soup_Master 4 роки тому +7

    Any plans of creating an updated course or a video that mentions how things are done differently with create-react-app's current build? I'm just having the worse time figuring out how some of the things have changed since render() doesn't appear to be used any more and the default is a function rather than `class todos extends Component {}`

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

      delete and update as per video. when he explains 'function component' you will figure out whats happening

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

      Im only 30 minutes in but so far just using his code works without breaking anything. Just change the import line and include the render()

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

    You really do not need to apologise for the length of the lesson. You made it freely available and it's excellent throughout, so thank you for your time and knowledge!

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

    After trying some sections on react on Udemy, I can say that it is the best intro (and more) into ReactJS, with code along examples, but more importantly, explanation on what you're doing and why you're doing it.

    • @AjayKumar-ts5jd
      @AjayKumar-ts5jd 4 роки тому

      where can i refer for shortcuts like core css codes directly. i am beginer !

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

    Great tutorials as always. Django with React pleeeeaaase

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

    you helped me understand so much! please make part-2, on how to deploy on gcp/others, i would like to know the deployment stage. btw, after deploy on local, i open the build folder, index.html is blank unable to show anything, is this normal?

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

    is anyone else seeing function App() instead of a class?

    • @vitoralecrim
      @vitoralecrim 5 років тому

      Yep, I'm. I don't know if is some new change where u doesn't need to declare a class... idnk

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

      yes they change it , we can use hooks now for state in function components

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

      yes

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

      how did you solve that problem ?

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

      @@harismemon1546 Simply replace the functional App() with a class based App()

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

    First of all, Brad, you are gifted instructor. I learnt and keep learning from you.
    I decided I'd share one trick Brad showed here, but he didn't pointed out (maybe because he is so modest, lol)
    While adding new todo he puts get-response from server directly to local state, which triggers to update the Dom automatically, this makes no need to re-fetch whole array of data from backend and mounting response again to local state, thus no need to use componentDidUpdate lifecycle method to update UI.
    Brilliant, thank you Brad!

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

    You are an incredible teacher. I often look at 10 other videos and then always end up coming back to yours, which are explained so well and simplified for easy learning. I can’t thank you enough for making all these videos readily available for us!

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

    Love this video, such a great tutorial that explains things so well!
    But I wonder what his wife did when she saw that dinner with her was on a todo list 😆

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

    Thanks for this crash course! It is pretty great.
    I have a question though, around 1:32:30, when I add the todos by doing a post request to the jsonplacerholder API, they always get added with the same id, 201. How do I fix this?

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

      add the following "res.data.id = uuid.v4(); " to the promise before setState in addTodo() , that would work.!

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

      Hey I have same question, did you manage to sort this out? I did not exactly get where Ganesh is saying to add res.data.id​ = uuid.v4();

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

      Ok first just sort out why we are getting 201 ids for every new item we add. Now theJSONPlaceholder has 200 pre-written todos in the API, so requesting a new list will always give you 201 as Id (even after adding limit=10 or more) which is normal for an API, but in our application, we can add our own Id by using "res.data.id = uuid.v4(); " to the response we get. I'll copy-paste the code here so things are clearer
      addTodo = title => {
      axios
      .post("jsonplaceholder.typicode.com/todos", {
      title,
      completed: false
      })
      .then(res => {
      res.data.id = uuid.v4();
      this.setState({
      todos: [...this.state.todos, res.data]
      });
      });
      };
      So in the promise, we are adding our Id to the response before setting the state. Hope this is understood.

    • @AjayKumar-ts5jd
      @AjayKumar-ts5jd 4 роки тому

      where can i refer for shortcuts like core css codes directly. i am beginer !

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

    Timestamps for this course:
    0:00 Intro
    8:16 Anatomy of a component
    9:42 Quick overview of the app to build
    11:13 Software requirements
    11:45 Creation and overview of app's boilerplate
    18:25 Running the server
    19:14 Performing basic cleanup
    20:45 Todos component

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

    I am currently a Flutter developer and I love working with it. Now learning React.js from scratch from Brad, which is very exciting. It might be 1 hour 40 mins but I suggest you taking as much time as required, do not skip anything and make sure that you learnt even if it takes 10 hours. Cheers!

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

    This is quite confusing as to how to learn since that functional update. I'm sitting here at 20min into the video trying to figure out how to construct the todos variable and pass it on to Todos.js... What an unfortunate update :(

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

      i mean for the sake of just getting used to react I just ignored that and used classes instead. I assume once I get used to react I'll be able to figure the rest out. :)
      I still got a lot of value out of this crash course. thanks :)

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

      Same here! Anyone watching this anno 2020, just write out the code Brad is showing. Get it to work, get your feet wet. Then improve and make pretty and obide by new react laws.

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

    @traversyMedia, Please next time when you make a tutorial name the properties and the classes/components differently. I had to pause so many times just because I could not understand which "todo" you were talking about.
    You could use "todo" for the component and "todoProp" for the property, at least that way I can keep track of which thing you are talking about.

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

      Second this. I love his tutorials, but this one was very difficult to understand with everything being called "todo".

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

    1:13:42 for unique id's you could use, this.state.todos.length+1

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

    Yes! Brad, you're a lifesaver. I was looking for a short(ish) crash course on React as I was starting to get a bit confused learning it on FCC & I wanted to get a quick rundown so that I can go into it with a kind of bird's-eye view. Naturally, your *very helpful* channel happens to have just what I need. So thank you.

  • @DrLexus-dq2wp
    @DrLexus-dq2wp 5 років тому

    inside the addToDo method:
    axios.post assigns the same key (201) to every new entry, which results in an error in the console.
    brad recently fixed this issue by modifying
    .then((res) => {
    res.data.id = uuid.v4();
    this.setState({ todos: [...this.state.todos, res.data] });
    for those who don't want to use uuid consider:
    res.data.id = this.state.todos.sort((a, b) => b.id - a.id)[0].id + 1;
    which gives you incrementing ids
    awesome content as always! say hello to the sea gulls for me.

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

    Really nice Video ...but there is a big problem. There is no render () function in the App.js in the newer React version . Does someone have the same problem?.

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

      yes I have the same thing, this is a big headache

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

      Just rewrite the code so it reflects the es6 class syntax used in this tutorial and wrap the return statement in a render function.

    • @arthurradium5823
      @arthurradium5823 5 років тому

      @@nevuxxx Im not sure if i understand ..but thanks!. i keep trying....