React Router Tutorial | React For Beginners

Поділитися
Вставка
  • Опубліковано 3 тра 2019
  • Check out my courses and become more creative!
    developedbyed.com/
    Microphones I Use
    Audio-Technica AT2020 - geni.us/Re78 (Amazon)
    Deity V-Mic D3 Pro - geni.us/y0HjQbz (Amazon)
    BEHRINGER Audio Interface - geni.us/AcbCpd9 (Amazon)
    Camera Gear
    Fujifilm X-T3 - geni.us/7IM1 (Amazon)
    Fujinon XF18-55mmF2.8-4 - geni.us/sztaN (Amazon)
    PC Specs
    Kingston SQ500S37/480G 480GB - geni.us/s7HWm (Amazon)
    Gigabyte GeForce RTX 2070 - geni.us/uRw71gN (Amazon)
    AMD Ryzen 7 2700X - geni.us/NaBSC (Amazon)
    Corsair Vengeance LPX 16GB - geni.us/JDqK1KK (Amazon)
    ASRock B450M PRO4 - geni.us/YAtI (Amazon)
    DeepCool ATX Mid Tower - geni.us/U8xJY (Amazon)
    Dell Ultrasharp U2718Q 27-Inch 4K - geni.us/kXHE (Amazon)
    Dell Ultra Sharp LED-Lit Monitor 25 2k - geni.us/bilekX (Amazon)
    Logitech G305 - geni.us/PIjyn (Amazon)
    Logitech MX Keys Advanced - geni.us/YBsCVX0 (Amazon)
    DISCLAIMERS:
    I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
    In this episode we are going to cover a popular react library called React Router. React Router allows us to create client side routing in our react project.
    Probably one of the best thing it allows us to do is create dynamic routes and fetch api calls based on route parameters.
    📕 Things covered in this video:
    - React Router
    - How to use the BrowserRouter, Route and Switch.
    - How to fetch apis with react router
    ❤Become a patreon for exclusive videos and more!
    / dev_ed
    🛴 Follow me on:
    Twitter: / deved94
    Instagram: / developedbyed
    Github: github.com/DevEdwin
    🎵 Music:
    Outro:
    LAKEY INSPIRED - Me 2 (Feat. Julian Avila)
    Music By: / lakeyinspired
    Intro:
    Dj Quads
    Track Name: "Every Morning"
    Music By: Dj Quads @ / aka-dj-quads
    Creative Commons - Attribution-ShareAlike 3.0 Unported- CC BY-SA 3.0
    creativecommons.org/licenses/b...
    #javascript #react
  • Наука та технологія

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

  • @Ayeces8s
    @Ayeces8s 2 роки тому +507

    As of approximately November 3rd, 2021, react-router-dom v6 (stable) was released and there are a few things outlined in this tutorial that need to be changed in order for it to function properly.
    1. Instead of importing and using the Switch component, import and use the Routes component instead. (e.g. import { Switch } from ‘react-router-dom’; becomes import { Routes } from ‘react-router-dom;’
    2. The “component” prop within a Route should be specified as an “element” prop instead (e.g.

    • @chimwemwechinamale6716
      @chimwemwechinamale6716 2 роки тому +83

      Also make sure that the element is JSX i.e. element={}

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

      Way to helpful thank you

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

      this comment and answer by Chimwemwe removes the bug... Thank you guys

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

      wow thanks!

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

      I hope Ed would see this.

  • @daboos8
    @daboos8 4 роки тому +1065

    Routes are impressive. But, what's more impressive is how you magically 'routed' all this information to my brain in half an hr... what kind of wizardy is this?!!

    • @alizalakhani7300
      @alizalakhani7300 4 роки тому +19

      His explanations are always amazing.

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

      yes exactly ... +1

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

      My point exactly, I never believed I could learn this much in half an hour if I was thinking of gathering all the pieces myself, it would take days probably to finish gathering if not more. Thanks a lot, Edddddd!

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

      If you guys understand that, why I can reach each page separately by refreshing, but cant reach from about "/about" to home dir "/" back.

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

      These videos made me buy his courses, they are absolutely amazing

  • @harunguven8581
    @harunguven8581 2 роки тому +53

    this tutorial is now slightly out of date, to fix issues:
    after timestamp 08:30 to 12:20 solution is below.
    after 12:20 to 14:35 we don't need to add exact keyword to anymore, due to last changes to react-router-dom.
    at 29:52 if match object doesn't work use useParams( ) from react router dom, const params = useParams(); add this in ItemDetail( ) , now use params.id in fetch function.
    step 0 -- > don't use App.js
    step 1 -- > create RouteSwitch.js in src folder.
    step 2 -- > add this code below to RouteSwitch.js
    step 3 -- > let index.js render RouteSwitch.js instead of App.js
    step 4 -- > continue to learn.
    // start to copy here
    import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
    import About from "./About";
    import Nav from "./Nav";
    import Shop from "./Shop";
    const RouteSwitch = () => {
    return (




    );
    };
    const Home = () => {
    return (
    Home Page
    );
    };
    export default RouteSwitch;
    // end copy here

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

      thanks! Coming from theodinproject and this is very relevant

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

      Yes you are right

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

      Thanks this helped!

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

      What is the reason for needing to use RouteSwitch.js versus App.js? Shouldn't these function the same so long as your index.js is set properly?

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

      Thanks big time

  • @ahmedaminedev
    @ahmedaminedev 3 роки тому +64

    **UA-cam recommendation**: ...
    After 5 seconds:
    - I am react developer now

  • @anjepnjr2995
    @anjepnjr2995 4 роки тому +253

    after serious hours of struggling with react routes i finally stumble into this awesome 30min vid that save ma life . Thanks Ed now i can handle routes without any prob

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

      same here, all the react router tutorials out there are just simply "menu" style, but we need something like this to understand how the f!"·$% it works, thank you so much for your time sir.

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

      Totally agreeeeeeeeeee hahahaha!!

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

      True said... making simple to understand

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

    God, it' so refreshing to actually see someone teaching code that HAS a personality.
    Makes the video go by 10x faster.
    Keep up the good work, my dude!

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

      Swear! Like you are totally right my man, this dude is awesome.

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

      Exactly! Every other video out there for tutorials are droning.

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

      I dunno man, by 0:32, I was too annoyed to continue, so I'm moving on to the next search result.

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

      Same, I love Ed, I would choose to watch him over anyone else because his voice has more than one setting

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

      @@RonWarnerBubbleKing Maybe your knowledge is the same with what siri said about react router and your ego is too high to hear other opinion. Or you prefer long and boring two hours of video with indian accent, fast speech, and loud key presses...

  • @M4RCi92
    @M4RCi92 3 роки тому +54

    Such a squeaky clean, easy to understand, well structured guide. I also love the overall friendly, upbeat vibe of the whole thing. This is honestly among the very best tutorial videos I've ever seen, thanks a lot, Ed!

  • @kittjosef
    @kittjosef 4 роки тому +27

    Dev Ed is a very effective teacher, he’s not irritating to listen to, he’s humorous, he’s direct, and all he says are comprehensive so kudos. I learned react fundamentals thru him. Thanks, man.

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

      when you need to come back to his videos multiple times, those querky way to present is kind of annoying. For the first time, it's ok for me though.

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

      @@aluuusch your problem not his

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

    Your React tuts are the absolute best. So fun and educational. And your excitement is contagious! Thank you so much for creating all this content

  • @bryanperryruiz4635
    @bryanperryruiz4635 4 роки тому +83

    This guy is a legend.. Thanks for the wonderful tutorial, I've learned a lot from you than my college professor.

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

      I could relate to this !!

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

      Your college teaches React??

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

      Here you go Everything about React from Beginner to Advance level
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

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

      @@nirmitjatana1245 yes they do, from it's history to it's application on the real world.. And we didn't learn anything 😅

  • @chrisneal6374
    @chrisneal6374 3 роки тому +16

    "easy peasy lemon squizanno" is the new abracadabra lol great tutorial!

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

    Your content is SOOOO GOOD! Your teachings are great, you have personality and it's genuinely entertaining to watch. Learning ReactJS is going to be way more fun with your channel to help understanding the basics. Thank you very much for your work.

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

    Thanks Ed, wonderful video...
    very informative.. and to the point...
    your 30min video saved my 3hrs to study, understand and implement the topic....

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

    You deserve alot of credit for this video good sir. This was the quickest way to helping me get a react JS router setup in minutes. Keep up the good work.

  • @alexbkf
    @alexbkf 3 роки тому +31

    It seems I am not the only one who felt a good personality from him. I am a newbie to the react world and this video really gives me confidence and motivation. Thanks bro!

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

    I watched three other tutorials and read the docs before landing on this one. This was so clear and easy to follow. You're an amazing teacher and communicator! Thank you!!

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

    Magic of this video is that not only you teach us but also have fun with all the work and little mistakes you do

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

    I remember trying to learn React Router a couple years ago and being completely clueless from other tutorial videos. Thanks for this, it was so straightforward and easy to learn!

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

      Same

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

      Here you go Everything about React from Beginner to Advance level
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

  • @NaveenKumar-xq6ce
    @NaveenKumar-xq6ce 3 роки тому +4

    This is probably the useful 30 minutes i have ever spent on You tube. Thank you Ed.

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

    In case anyone missed it, the reason match.params contains "id" at all is because he defined it inside the route by saying path="/shop/:id". So the value of id is essentially set to be the same as the last part of the URL. It could have been called anything else, e.g. if it was instead written as path="/shop/:itemId" then match.params would contain a key called itemId.

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

    Please keep showering your knowledge . Great tutorial. Great voice and your communication skills keeps enjoying the crowd while learning :)

  • @connoroverby8868
    @connoroverby8868 4 роки тому +25

    Your "Hey, Google..." set off my Google Home telling me about the weather today

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

    I am a beginner in React and was looking for more concepts to learn then I came across this video and gave an instant like just for that intro.
    Explanation was really helpful.
    Keep it up! This is an appreciation for how you guys help the community.

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

    Man you are a legend, I've studied for literally dozens of hours, got confused on a lot of stuff. Then in a few videos, not even 2 hours total of time I managed to learn everything that I couldn't before ( hooks, props, routers, redux and how to build a Todo list with ease)

  • @elineoosterloo3555
    @elineoosterloo3555 4 роки тому +228

    Stop it! You're making me laugh out loud at work! XD

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

      he is impressive first tutorial to enjoy

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

      All you need for React
      Formik for building Forms
      ua-cam.com/video/3xMiK5mVBpM/v-deo.html
      React functional Hooks
      ua-cam.com/video/HmOw-45vg80/v-deo.html
      React JS Full Course
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

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

      This guy is a legend 😂

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

      I want to be able to laugh at work one day 😔

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

      It's good explanation....

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

    This video is amazing! I love that you code everything from scratch. I like that you do four space indentation. IMO it's easier to read than two-space indentation. I love that you use pure CSS and not some CSS/Framework. Coding along we can see how everything works together. Keep up the excellent job! :)

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

      Why I love Dev-Ed

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

    Great Ed! Love your way of teaching, concise, straight to the point and fun.

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

    Thank you so much for this! Really appreciated how smooth and thorough you were!

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

    "INCORRECT!!" I did not see that coming 🤣

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

      xD

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

    You are awesome! This is exactly what I need for my project. Thank you so much.

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

    Resoect to all programmers out there teaching us through tutorials , but Dev Ed teachings are in another level, straight to the point and extremly simple.... thanks Ed hats off to you

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

    This video was exactly what I needed. Been looking for something like this all day.

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

    That's some awesome content! I was waiting for a channel like this. Glad I found one today. Subbed instantaneously! Can you make a video on fetch API? That would really be helpful.

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

    the world is so blessed to have people like Ed :)

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

    This is honestly one of the best tutorials I've watched ever

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

    Best teacher ever! 🏆🏆🏆 I was going nuts trying to figure out dynamic routes until now. You explain things so well, it's like sitting down with a good friend who knows lots of cool stuff and likes to talk about it.

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

    good video,it's worthy 30min, I understood almost everything, tks so much

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

    The start was a little bit messy, but I liked very much the explanation of the dynamic route, thanks man

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

    That was great, learned more than I expected to learn and I got a better understanding of React from these 30 min than from a 4 hour course!
    Thank you!

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

    Probably the best React router tutorial I have ever come across.So much energetic you are man !! Hats off !!

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

    Thanks for a fun pedagogical tutorial :D This makes me want to learn react even more!!

  • @AhmedKhaledCH3
    @AhmedKhaledCH3 4 роки тому +77

    what kind of weed do you smoke man you seem extremely happy lmao nonetheless i enjoyed this video so much and it was very helpful thanks

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

      eh. funny guys often got some deep pain lol. he makes dark jokes if u listen carefully lolololol

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

    I think this is the best tutorial for React Routing. I have watched so many videos to learn React Router but couldn't learn it. Finally I have found this tutorial and learned the React Router properly. Thanks Ed.

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

    Man whenever i'm fed up with anything web related i come to watch this guy and calm down, i love his way of explaining things so simple and he just seems as lost as me when coding then BAM everything works

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

    ahah the intro is amazing!!

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

    Love Your Videos! ❤️! I learn a lot from them! Thank You So Much!!! ❤️
    Edit: OMG Thanks for the heart ❤️❤️

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

      lol heart is no more

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

    Even with the outdated components, still the best introductory video I've seen on Router so far. Plus, the comment section plus the documentation (read the docs, always) managed to keep this video useful, especially to understand the principles of this library.

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

    That legit blew my mind. I needed the first 10 minutes to figure out how to do basic routing, I stayed for the rest and now my brain is on fire with ideas lol

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

    Shouldn't `` components be inside `` and not the other way around? Just saying. 😜

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

      It's a react thing...

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

    just watched this video for 6 times.. i literally got 20% of understanding.. will watch more and more times to get 100% understanding

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

      9 month ago, what is progress? How many times have you watched that?

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

      @@pyloolex did couple of projects now, so much to learn, not finding difficult but learning is fun

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

    I've watched like 3-4 videos on Routing, and no one, absolutely no one, made it this easy to understand! :)
    Thank You Ed!! :)

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

    Before knowing power of routes I was feeling there would be a tough time setting backend but after , it's super clear . Thanks Ed

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

    LMFAOOOOO WHEN YOU SAID "this is the part of development that makes me feel... alive"... im DYING. i know man its so dry sometimes lol

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

    Me: ditches uni lectures because you explain things so much better :)

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

    I love how you explain with great simple, real live examples.. amazing teacher!

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

      All you need for React
      Formik for building Forms
      ua-cam.com/video/3xMiK5mVBpM/v-deo.html
      React functional Hooks
      ua-cam.com/video/HmOw-45vg80/v-deo.html
      React JS Full Course
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

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

    I just LOOOOOOVE your videos. You make my studies so much easier. Thank you !

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

    API has changed, so use it like this.
    const fetchItems = async () => {
    const data = await fetch('fortnite-api.theapinetwork.com/upcoming/get');
    const items = await data.json();
    console.log(items.data);
    setItems(items.data);
    }
    return (
    {items.map(item => (
    {item.item.name}
    ))}
    )

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

    "Easy squeezy lemon squeezano" .... I lost it there 😂😂

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

      Here you go Everything about React from Beginner to Advance level
      ua-cam.com/video/ZWqfADc-0K8/v-deo.html

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

      Yeah 😂.. Its easy peasy i guess

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

    Once again, Ed comes through with a winner. One can actually follow along with this and construct a working application. Some issue with the API used in the course, but suitable substitutes are available. I love the way he says "back ticks." I wind up repeating it every time he uses it.

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

    The way you deliever the tutorial is genius. The thing that I highly appreciate is that you are able point out the key things to avoid mistakes and make me understand better. Thanks so much.

  • @OmPrakash-ot3nr
    @OmPrakash-ot3nr 3 роки тому +3

    Why at 32:20 images field was needed to set to empty?

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

    Hey, I have a question. You are using useState. Is it different from converting App.js to class and then setting a constructor with this.setstate? Because this looks som much simpler and cleaner. Thanks.

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

      I ask myself same question...

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

      @ As far as I know using the state hook is pretty much the equivalent as you cant use any hooks in React class components. They allow you to use React without classes.

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

      When you use function based components, this is the only way to set state, with the "useState" Hook. You can't use setState in a functional component as you can in a Class Based one. BTW, you don't need a Constructor in a Class Based component to use setState. I only use a Constructor if I need to initiate something else (other than setState).

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

      It does the same thing. useState is a React hook which provides the ability to implement states in functional component. It's a simple and cleane way than using the class components.

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

    i wasted hours looking other devs but no one do and explain this basic but real life exercise better than you in this video, easy to understand. Thank you!

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

    THANK YOU! Finally a good dynamic link tutorial, just what I was looking for.

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

    Cool tutorial, thanks for sharing! Question: when console.logging "item.images" I do see the props inside, but when calling "item.images.transparent", like you, I get the undefined error. How come I can see it but not use it? Why do I have to declare the images object in the state first?

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

      i was wondering this too at first. It's because the page renders once before the API request is complete. It therefore reaches the return statement before the API request is complete and runs the code calling "items.images.transparent". Before the request is complete this is undefined. If you add a console.log('test') or something after the FetchItem function is called, you'll see the 'test' appear twice: once before, and once after the API data loads

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

      @@seanbarker4713 did you solved it? I've been dealing with the same problem for two days and still can't solve it :c

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

      @@karsi14_ what I said above should work

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

      ​@@seanbarker4713 I have a lot of console.log in all the code (I was testing why it was throwing the error) and that's how I discovered how it was rendering, I have a console.log after the FetchItem function is called and it still doesn't work, still throwing the same error :(
      Some comments above someone told me to update my npm and React hahaha hope that combining both things it finally works c:
      Thank you c:

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

    since the API link has updated so add this in your shop.js file
    {items.map(item => (
    {item.item.name}
    ))}

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

    My good man, you have no idea how much it means to me that I have found your tutorial.
    I've been at work for two days trying to figure out how to do this. I was at my wits' end on why I could access all my data, but not one by Id.
    You have my eternal gratitude! Have my like, have my subscription! HAVE EVERYTHING!
    Thank you!

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

    My next video I was going to check up on was setting up the API with Router and BOOM there it was included. This tutorial is PERFECT. Thank you!

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

    In order for 'react-router-dom' to work I had to first install it... If you have this problem just open the terminal (on your project's folder) and run 'npm i react-router-dom'.

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

      Well, he tells us to install it in the beginning :D

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

      @@KalleZz_ oh I didn't notice it :P

  • @the-og-testudo
    @the-og-testudo 4 роки тому +4

    Awesome tutorial! FYI - the API you're using in this example now returns "access denied."

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

    Amazing tutorial! Loved how I learned some details there aside from Router like the image empty so that it changes as soon as it loads.

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

    that was basically all i needed to get started on react coming from VueJs. going typescript too but should be similar :) thnx a lot. way more info than expected (like the hooks thing), even covered fetch. for a beginner thats an outstanding tuto!

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

    * THE BESTEST REACT TUTORIAL EVER *

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

    6th?

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

    You just made my day. I've been looking for an answer to this for two days now. Your content is on point and you're hilarious!

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

    You absolutely smashed it! I've learned more in the last 30min than in the entire week!

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

    The API is different now. In order to do it you can write the following:
    1. Shop.js
    - const data = await fetch('fortnite-api.theapinetwork.com/upcoming/get');
    - setItems(items.data);
    - {item.item.name}
    2. ItemDetail.js
    - const fetchItem = await fetch(`fortnite-api.theapinetwork.com/item/get?id=${match.params.id}`);
    - setItem(item.data.item);
    - {item.name}
    -

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

      Thank you

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

      while following his tutorial I had a ,ype error with using items.map items.data worked. before i lost all my work on codesandbox i couldnt figure out how to map through and return all the names like he did at first in his first fetch call in shop.js how would you have done it?

  • @trunkey-dev
    @trunkey-dev 2 роки тому +3

    This tutorial is outdated everyone

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

    this was really helpful thank you...I got lost at a point when I was trying to implement it on a site I'm working on and this put me on track

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

    You continue to help me make some of my favorite dream projects, thank you!

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

    I don't usually comment or like tutorial videos but I just love this guy. Thanks for sharing your knowledge with us. You're a good UA-camr

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

    this is something meaning full, clear crystal explanations. impressive MAN

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

    Thanks for your help Ed! Was really stuck on how to use the dynamic part of the URL. This finally made some sense!

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

    OMG, you make it so clear. Thanks! I hope you feel better soon, so we can see more of this marvelous content

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

    Man your tutorials rock!!! Love your energy and interesting way of teaching. God bless you Ed.

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

    You sir, are a great teacher. You make the whole process a joy. Your pleasant voice adds to it

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

    Awesome tutorial, man. Very thorough and comprehensive.

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

    I really liked that the workflow goes with actual human intuition!! super easy to understand and very practical. Thanks!!

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

    One of the best tutorials I've seen to react. Great job dude!

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

    This is Ed, the start of the video says it all!
    Thanks man!

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

    The best video for this subject. And your personal notes and presentation adding even more to it. THANKS!

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

    Dude, thank you so much for create this content! I was figthing with routers for a week. You save my life Ed.

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

    The best video I have ever seen regarding React-Router! Thank you so much!

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

    Easily the best video explaining how routing in react works. Thank you so much!!!

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

    wow, great video! good pace, well planned out, very clear and to the point!

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

    Another awesome video. Thanks, man. I was very entertained, honestly. You explaining it makes it really easy to understand things. Ps: was laughing the whole time. God bless you and your family, Ed. Thank you ❤️

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

    It is such a delight to watch you and you really make stuff easy!

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

    I like your teaching style. I thought that react is so hard. But after finding, your react videos I fall in love with react. Thank you so much.❤❤❤❤❤

  • @TuanNguyen-ls6hm
    @TuanNguyen-ls6hm 2 роки тому

    Love watching your tutorial, it give me energy to continue on my projects

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

    I couldn't help but smile the whole freakin' time. Thanks, very clear!