Build A Pokémon Application With React - Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024
  • Building React applications doesn't have to be about building boring todo lists. In this video we will be creating a React Pokemon application using the latest features of React. This means we will utilize hooks for state and effects instead of classes. By the end of this video you will have a strong understanding of the basics for building out a React application that accesses external APIs.
    🚨 IMPORTANT:
    Learn React Today Course: courses.webdev...
    📚 Materials/References:
    Array Destructuring Tutorial: • Why Is Array/Object De...
    GitHub Code: github.com/Web...
    🧠 Concepts Covered:
    Creating a React application
    useState hook
    useEffect hook
    How to use axios with React
    How to organize React components
    🌎 Find Me Here:
    My Website: webdevsimplifi...
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/Web...
    CodePen: codepen.io/Web...
    #Pokemon #WDS #React

ความคิดเห็น • 178

  • @simonkalu
    @simonkalu 5 ปีที่แล้ว +122

    You're truly what you called yourself"Web Dev Simplified". You explain complex topics so effortlessly and also your videos are so inspiringly awesome

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +25

      Thank you so much! That really means a lot to me and inspires me to push forward and make more even better videos.

    • @pastorfred2543
      @pastorfred2543 5 ปีที่แล้ว +15

      He made me to understand ES 6 & 7 promises, Async & Await and High order array functions that I staright away implemented them in my project. He is a Hero.

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +19

      @@pastorfred2543 Thank you so much! You are truly way too kind to me. All I did was give you the information. You were the one that processed and consumed that information to implement amazing things.

  • @liorocker1
    @liorocker1 5 ปีที่แล้ว +58

    Came here after React in 30 minutes, I think this is a very accurate path to move forward as a React newbie, and now everything is more clear to me. Thank you very much for this amazing videos :)

  • @sauer.voussoir
    @sauer.voussoir 4 ปีที่แล้ว +5

    I just shouted wow at the end of the video, when all your explanation are very straight forward and very easy to understand!

  • @DeltaNrOne
    @DeltaNrOne 3 ปีที่แล้ว +4

    I like how you just dont care about how good the page looks and just codes trough it.
    Awsome video!

  • @amritkumaragarwal9425
    @amritkumaragarwal9425 ปีที่แล้ว +2

    Both ur tutorial and calmness while teaching are adorable :)

  • @rayanfernandes2631
    @rayanfernandes2631 3 ปีที่แล้ว +6

    This was one of the best Tutorial i watched... Understood a lot about hooks.

  • @DevashishRoyChowdhury
    @DevashishRoyChowdhury 3 หลายเดือนก่อน +1

    Very great way of teaching ! You taught this so easily I thought it will we very hard

  • @____prajwal____
    @____prajwal____ 5 ปีที่แล้ว +18

    Awesome tutorial! loved it! I think we need more of these mini tutorial projects based on API's and many other stuff!

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +3

      Thanks! I really enjoy making these mini projects and have a ton more that I want to do.

  • @michaelwatson9089
    @michaelwatson9089 ปีที่แล้ว +1

    He wasn't kidding when it comes to learning the core topics of a project. This would of been longer if we built out an actually Pokémon app and got bogged down with html and CSS. This was a good tutorial.

  • @mohammedalmukhtar8949
    @mohammedalmukhtar8949 5 ปีที่แล้ว +43

    You got sunburn budd? Looks like you had a fun long weekend :P Thanks for the video!!

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +21

      Super sunburnt, but it was a fun weekend so I would say it was worth it.

  • @niomi
    @niomi 4 ปีที่แล้ว +3

    Thank you so much, I've been scouring the web looking for a simple and easy way to do pagination with react and have gotten very complex answers. Saved me a ton of time!

  • @rasifrana
    @rasifrana 5 ปีที่แล้ว +7

    I am definitely taking your React Course. love your videos. simple to understand. Thanks for the contents.

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +1

      Thank you so much! I really hope you enjoy the course.

  • @ravishbisht502
    @ravishbisht502 ปีที่แล้ว

    Thanks bro. After 4 years of this code i faced some difficulties running it in my device but i figured it out and really helpful❤

  • @mauricemakesmovies
    @mauricemakesmovies ปีที่แล้ว +3

    Just built my first React app, thanks so much Kyle! Heads up: When I tried to use return () => cancel() I got the error that cancel was not a function, it only worked when I removed the parenthesis.

  • @AlThePal78
    @AlThePal78 3 ปีที่แล้ว +1

    Your videos are awesome and it is easier to understand you then my bootcamp i went too

  • @stclark278
    @stclark278 3 ปีที่แล้ว +1

    Your tutorials are great to watch. I really enjoy that you do examples that are more complicated than simple todo apps like most other TH-camrs. I'm impressed at how well you explain what you are doing and why in a easy to understand but thorough way!

  • @bennett3625
    @bennett3625 5 ปีที่แล้ว +4

    My man, awesome tutorial! Watched it before I started my work day and loved the concise explanations for everything. Grats on 30k btw!

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +3

      Thank you so much! Reaching 30k amazing subscribers feels unreal. I cannot believe it has happened so quickly.

    • @kneetotheface
      @kneetotheface 2 ปีที่แล้ว

      @@WebDevSimplified how does it feel to look back at this comment and have already passed 1M subs?? 30K < 1M ur such a 1337 h4x0r, my d00d!!!

  • @rohitkudalkar92
    @rohitkudalkar92 5 ปีที่แล้ว +2

    sir your videos are really unique and interesting for every frontend developer. thanks for making great videos.

  • @gojosensei7081
    @gojosensei7081 10 หลายเดือนก่อน

    Awesome tutorial, such a simple explanation!

  • @theazimjon
    @theazimjon 2 ปีที่แล้ว

    Really nice man, your videos so understandable.I clearly understand complex topics with your videos.I'm happy for find you from TH-cam. I wish I had a teacher like you

  • @pjguitar15
    @pjguitar15 3 ปีที่แล้ว +6

    I honestly use fetch over axios but because WebDev Simplified is teaching Axios, i guess it's time to use axios now haha

    • @xouchthathurtzx
      @xouchthathurtzx 3 ปีที่แล้ว

      I was taught with axios out the gate, so I just stick with it. there are 3 parts:
      .get(url here).then(action after hitting API).catch(error message here)

    • @AlThePal78
      @AlThePal78 3 ปีที่แล้ว

      I like axios with async better because you can make it simple. Fetch haves promises and they always render successful even when they are not :)

  • @shilpavaidya1077
    @shilpavaidya1077 ปีที่แล้ว

    simple and efficient way to start my react app... thank you!

  • @waynes9744
    @waynes9744 5 ปีที่แล้ว

    This is my No.1 web dev channel.

  • @laurenmarcinek8146
    @laurenmarcinek8146 3 ปีที่แล้ว

    i spent $12k on a 6 month course and have learned more from you in two weeks than i did that entire class lmfao ily tysm

    • @sovietbot6708
      @sovietbot6708 2 ปีที่แล้ว

      $12K? I spent $200 on a year subscription of Codecademy, and they even teach you how to pass technical interviews in their front end career path, and it's at your own pace

  • @getvivekjoshi
    @getvivekjoshi 5 ปีที่แล้ว +1

    Truly simple and easy to understand, thanks!!!

  • @adilbaqach9176
    @adilbaqach9176 4 ปีที่แล้ว +1

    Bro thank you so much u made my life easier, I wish I could buy ur course right now

  • @conaxlearn8566
    @conaxlearn8566 3 หลายเดือนก่อน +1

    How is it possible that the goto functions at line 41 and 42 would ever be null, since they are declared on line 28 and 32?

  • @chloeafp
    @chloeafp ปีที่แล้ว +2

    Such a great tutorial! I wish you'd explain how to get the pokemon images from the API too, I cant figure it out :D

  • @antonharbers9264
    @antonharbers9264 4 ปีที่แล้ว

    Best Content on the Web right here

  • @pastorfred2543
    @pastorfred2543 5 ปีที่แล้ว

    My Hero in the world of Programming.. This tutorial on #Pokemon is a warming up for the #React Course @ #WDS. Thanks Sir.

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      You're welcome! I'm glad you enjoyed it.

  • @israelmanzo8725
    @israelmanzo8725 5 ปีที่แล้ว +1

    Beautiful tutorial using hooks. Thank you..!

  • @moogle-studio
    @moogle-studio 4 ปีที่แล้ว +1

    Thank you, you explain everything in such a neat way

  • @yashraj6565
    @yashraj6565 3 ปีที่แล้ว

    Thank you sir. Bring more adv react projects.

  • @brownayy
    @brownayy 4 ปีที่แล้ว

    Thanks for the vid, I'm currently learning JavaScript as a pre-requisite to learning React, this was a good overview of what building in React actually looks like if that makes sense!

  • @kavithachellasamy2393
    @kavithachellasamy2393 2 ปีที่แล้ว

    Simple and more informative Thanks 👍🙏

  • @tonybrown7847
    @tonybrown7847 2 ปีที่แล้ว

    nice overview, nice start to an app

  • @vashu8472
    @vashu8472 3 ปีที่แล้ว

    Learned a Lot! Thanks Kyle

  • @lordfresh
    @lordfresh 3 วันที่ผ่านมา

    Where does that cancel function come from? Is that from the dependency and available after importing it?

  • @Gabriel-V
    @Gabriel-V 2 ปีที่แล้ว

    Got sunburned. You workout too? Nice, nice

  • @arturdeandrade7443
    @arturdeandrade7443 4 ปีที่แล้ว +3

    Great video! I'm getting really excited about React, can't wait to do more and more projects!
    About this one, I've found a bug and have no idea on what's causing it. I've gone to the last page, which only contains 4 Pokémon, and when I turn back to previous pages they all start showing only 4 Pokémon too. If anyone has encountered this problem too, and knows how to fix it and why it happens, I'd really like to fiind out!

    • @EmporerAxel
      @EmporerAxel 4 ปีที่แล้ว +5

      This is caused by the limit parameter being set to 4 by default on the prev field of the response, once you get to the last page. The API seems to reuse whatever limit parameter you last used in any subsequent response. If you put [ setCurPageUrl(nextPageUrl.replace("limit=4", "limit=20"));
      ] in the gotoNextPage and gotoPrevPage methods it should fix it

    • @arturdeandrade7443
      @arturdeandrade7443 4 ปีที่แล้ว

      @@EmporerAxel That was it, thank you very much!

  • @worldfromhome4033
    @worldfromhome4033 ปีที่แล้ว

    Awesome as always

  • @jessyreach7130
    @jessyreach7130 2 ปีที่แล้ว +1

    How can we access other properties of this API. Say I want to display the image or the HP, speed etc

  • @hugod7955
    @hugod7955 4 ปีที่แล้ว +1

    how can we do this by using a json document with all information on the pokemon, instead of using an api link ?

  • @coderb8762
    @coderb8762 2 ปีที่แล้ว

    thank you bro for good teaching

  • @JasbirSingh-kp4eu
    @JasbirSingh-kp4eu 3 ปีที่แล้ว +1

    How much years of exp have you in web dev? Just curious to know😅😅

  • @rangabharath4253
    @rangabharath4253 5 ปีที่แล้ว

    Awesome. Thank you so much. Very interesting. Keep going. All the best

  • @joelkuijper
    @joelkuijper 5 ปีที่แล้ว

    Great tutorial as always!

  • @antoniobutcher
    @antoniobutcher 4 ปีที่แล้ว +1

    digging the sunburn ;)

  • @hassaneoutouaya
    @hassaneoutouaya ปีที่แล้ว

    Thank you so much!

  • @NicolayKjarnet
    @NicolayKjarnet 2 ปีที่แล้ว

    Great tutorial, but you should've clicked to the end of the list of pokemon's so that we could fully understand the application.

  • @philipbeauford
    @philipbeauford 2 ปีที่แล้ว

    Hi, plz lmk what you are using to append those full screen shots after the descript screencap portion?

  • @atikehasan5872
    @atikehasan5872 10 หลายเดือนก่อน

    its great tutorial foreever

  • @aammssaamm
    @aammssaamm 4 ปีที่แล้ว

    And if you have another 6 or 8 consecutive events affecting buttons’ visibility do you still dump all these into the same list? How do you resolve the conflicts then? If-else-if-else-if-else-if-else until you get burned out?

  • @stevendornan7979
    @stevendornan7979 5 ปีที่แล้ว

    Thank you :) Starting this right now.

  • @thequickcode5144
    @thequickcode5144 2 ปีที่แล้ว

    Yo Man u did a great job

  • @valenciawalker6498
    @valenciawalker6498 10 หลายเดือนก่อน

    Thank you!

  • @viniciusneto6824
    @viniciusneto6824 4 ปีที่แล้ว

    Great video! Thank you! How could I get the pokemon details? I mean... How would the API calls be arranged in a sequential structure? I'm really struggling with these Promises.

  • @the_yugandharr
    @the_yugandharr 10 หลายเดือนก่อน

    This looked deceivingly easy to me but man React isn't easy!

  • @angiep3883
    @angiep3883 3 ปีที่แล้ว

    Can you use class component as opposed to function? (E.g : class PokemonList extends React.Component{} ) ?

  • @aarav751
    @aarav751 7 หลายเดือนก่อน +1

    7:42, 16:08, 20:00

  • @JoeWong81
    @JoeWong81 5 ปีที่แล้ว

    another solid video bro

  • @TheBorjj
    @TheBorjj 4 ปีที่แล้ว +1

    Hello, very useful but I have a problem - when I try to fetch the result inside useeffect and then try to use the data it says it's undefined

    • @saumya7747
      @saumya7747 2 ปีที่แล้ว

      Hey, I know its too late to ask but if you know the solution to this problem please help me out as well.

  • @StarBattle08
    @StarBattle08 4 ปีที่แล้ว

    I need help, after doing *setPokemonData(res.data)* it returns and empty array, but when i save the file 1 more time, it returns the data from the api, but when the app first loaded it returns an empty array

  • @AymenTDD
    @AymenTDD ปีที่แล้ว

    Thanks bro

  • @maxiequa567
    @maxiequa567 5 ปีที่แล้ว

    Outstanding as always Kyle! Would you consider making a companion video creating the backend API with custom data? We have a ton of video tutorials on youtube using third party API data which is great for toy apps but understanding how to structure, code and deploy a bespoke API with the same features as the pokemon one but with our own data, would be full stack heaven :) p.s thanks so much for not doing another todo app!

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      I like this idea. I most likely won't make it a pokemon based backend, but I do plan to make some more advanced API tutorials. I personally love making APIs so they are always fun for me.

    • @maxiequa567
      @maxiequa567 5 ปีที่แล้ว

      @@WebDevSimplified Awesome! Yeah agree doesn't need to be pokemon but have similar features within the API such as Limit for pagination and Previous and Next, which we can then populate with custom JSON data.

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      @@maxiequa567 Great idea. I will add that to my list of ideas for sure.

    • @maxiequa567
      @maxiequa567 5 ปีที่แล้ว

      @@WebDevSimplified Sweet!!

  • @planetmall2
    @planetmall2 5 ปีที่แล้ว

    Great job!

  • @highvibes6116
    @highvibes6116 ปีที่แล้ว

    how would you do this just using fetch() instead of the axios fetch?

  • @rayenhidri584
    @rayenhidri584 3 ปีที่แล้ว

    perfect, thx for that

  • @mehmetemin5404
    @mehmetemin5404 5 ปีที่แล้ว

    amazing tutorial, thanks

  • @timmy1752
    @timmy1752 5 ปีที่แล้ว

    Hello! Thank you so much! Please make a pokedex application where there is a choice of types of pokemon, also in the field of each pokemon you can see his skills.

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +1

      I do not plan to make any pokedex application right now since it is a fairly involved process. That would be a great project for you to practice with, though.

    • @timmy1752
      @timmy1752 5 ปีที่แล้ว

      @@WebDevSimplified Okay, that's okay! Could you briefly help with how to get a date Pokemon where all his skills are and display on the screen?

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      @@timmy1752 This is very dependent on your use case. I would recommend looking at the API documentation for the API we use. That will give you all the information you need to implement this idea on your own. The best way to learn is to struggle through and create your own projects.

  • @victoriaestes2087
    @victoriaestes2087 ปีที่แล้ว

    Great video, and very helpful but as of Axios v0.22.0, the cancelToken API is deprecated in favor of using a fetch-like AbortController.
    I'm currently trying to make the new way of canceling work with this project. Would be cool to see a video about it as well.

    • @rishisetpal3537
      @rishisetpal3537 ปีที่แล้ว

      any update to cancelToken API is deprecated replacement?

  • @brsh1190
    @brsh1190 3 ปีที่แล้ว

    Hi Kyle, thank you for your work, very useful and impressive. Can you please help how to change the number of items on the first page (the default number is 20 from this api), thank you!

  • @ManpreetSingh-ew8qs
    @ManpreetSingh-ew8qs 3 ปีที่แล้ว

    Can't we use useCallback on nextpage and prevpage functions?

  • @danylfernandes6741
    @danylfernandes6741 2 ปีที่แล้ว +1

    Wish you had more TypeScript-oriented projects, but your content is great nonetheless, so keep up the good work!

  • @calvingonsalves7293
    @calvingonsalves7293 5 ปีที่แล้ว +2

    This is the second youtube channel that I have subscribed to and watched most of the videos after pewdiepie :p . Quality content. I’ll surely be ready for the React course as many tech startups I have interviewed with want to switch over to React and React Native from Angular.
    Thank you :)

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +9

      Thank you so much for the support. Maybe one day I can beat out Pewdiepie :P

    • @theazimjon
      @theazimjon 2 ปีที่แล้ว

      What is the first one

    • @calvingonsalves7293
      @calvingonsalves7293 2 ปีที่แล้ว

      @@theazimjon Pewdiepie ofc.

  • @frontmonkey2322
    @frontmonkey2322 4 ปีที่แล้ว +1

    now I knew what "Web Dev Simplified" means... I wish you can teach it in Korean.. >< ㅎ

  • @MrWrklez
    @MrWrklez 4 ปีที่แล้ว

    thank you!

  • @lildesiikid
    @lildesiikid 5 ปีที่แล้ว

    I'm getting this error: ./src/App.js
    Line 27:3: 'setCurrentPageUrl' is not defined no-undef
    Line 31:3: 'setCurrentPageUrl' is not defined no-undef
    Line 39:6: 'Pagination' is not defined react/jsx-no-undef
    ideas?

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      You need to make sure you import the Pagination component and create the setCurrentPageUrl variable with useState

  • @jameskirkland4180
    @jameskirkland4180 3 ปีที่แล้ว

    I was able to build this with the guide but i am having trouble figuring out how to style the component the right way. any tips on putting this list of pokemon into a box? Im trying to flesh out a pokedex eventually that pulls up stats and images when you select a pokemon from the list

    • @jameskirkland4180
      @jameskirkland4180 3 ปีที่แล้ว

      i found i can get style elements throught the return statement in the app.js file, for example putting the list and pagination inside of a section tag and using css to style. is this the correct way of styling in react?

  • @nicocontigliani7141
    @nicocontigliani7141 4 ปีที่แล้ว

    thanks alot !!!

  • @vladimirjean
    @vladimirjean 5 ปีที่แล้ว

    Awesome, thanks a lot.

  • @rockstarrockyush8502
    @rockstarrockyush8502 5 หลายเดือนก่อน +2

    Any Pokemon fans??

  • @injector6926
    @injector6926 3 ปีที่แล้ว

    realy good

  • @skapha
    @skapha 5 ปีที่แล้ว

    masterclass!

  • @ronniesunshine1163
    @ronniesunshine1163 5 ปีที่แล้ว

    I got super confused because I wrote "onclick" like normal javascript but for some reason react uses "onClick". That makes no sense at all. Damn consistency errors. Great video, as always

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว

      Lol. React used camel casing for the names because it makes it easier to read and follow.

  • @RoshanKrSoni
    @RoshanKrSoni 5 ปีที่แล้ว

    You are Amazing bro ❤️👌👌👌

  • @toastytomatos5006
    @toastytomatos5006 4 ปีที่แล้ว +1

    ok great vid but i keep getting this error when i press next on my button: TypeError: Cannot read property 'protocol' of null

    • @casadogaspar
      @casadogaspar 4 ปีที่แล้ว

      Put your code here, so we can see if anything is wrong, or a github link.

  • @mclovin72
    @mclovin72 5 ปีที่แล้ว

    Why not use classes? Sometimes I see classes with components sometimes I see functions. I feel like classes are more structured and easier. Is it because classes are newer to js?

    • @WebDevSimplified
      @WebDevSimplified  5 ปีที่แล้ว +3

      I am using functions since functions combined with hooks make doing complex things much easier. It also makes your code much cleaner to follow and read since you can easily break out and modularize your component while class components are quite bulky and hard to modularize. Hooks are also brand new to React so they have taken a lot of the bad things from classes and fixed them.

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      Because none of them knows what classes to built.

  • @museitian85
    @museitian85 3 ปีที่แล้ว +1

    Does anyone else get this error when trying to create the PokemonList div around 7:52? TypeError: pokemon.map is not a function

    • @thomasblack3415
      @thomasblack3415 3 ปีที่แล้ว +1

      I had this issue and then I realized I didn't have useState(['bulbasaur', 'charmander']); on App.js. I only had useState();
      After I fixed that, saved all and then refreshed the page, it worked just fine.

  • @bikidas5473
    @bikidas5473 3 ปีที่แล้ว

    You saved my day! Thanks a lot

  • @mustafakosmaz178
    @mustafakosmaz178 3 ปีที่แล้ว

    you achieve to simplify web actually

  • @ibrahimkaiser7961
    @ibrahimkaiser7961 4 ปีที่แล้ว

    Awesome tutorial and well-described. Though I'm new to react I understood most of it. But I'm facing a problem. As there are 964 pokemon, last page shows 4 pokemon, that's okay. But after that while clicking "previous" --> the page shows 4 pokemon everytime. How can I fix this. TIA

    • @viniciusneto6824
      @viniciusneto6824 4 ปีที่แล้ว

      As pointed by @EmporerAxel - This is caused by the limit parameter being set to 4 by default on the prev field of the response, once you get to the last page. The API seems to reuse whatever limit parameter you last used in any subsequent response. If you put [ setCurPageUrl(nextPageUrl.replace("limit=4", "limit=20"));
      ] in the gotoNextPage and gotoPrevPage methods it should fix it

  • @lukeyuanful
    @lukeyuanful 2 ปีที่แล้ว

    Is possible to get the project source code?

  • @ThePredsedatel
    @ThePredsedatel 3 ปีที่แล้ว

    im too stupid for webdev. how can i reffer to sprites from poke api?

  • @digigoliath
    @digigoliath 5 ปีที่แล้ว

    Nice!

  • @mateuspamaral00
    @mateuspamaral00 5 ปีที่แล้ว

    you're so amazing omg

  • @errollsipagan4617
    @errollsipagan4617 4 ปีที่แล้ว

    my mvp

  • @cingetorixhelvetii5172
    @cingetorixhelvetii5172 ปีที่แล้ว

    I started to learn CSS, HTML and JavaScript 2 months ago and now I want to learn react, but this looks too advanced for my level ☹️

  • @MasterPigeonXD
    @MasterPigeonXD ปีที่แล้ว

    Did not work for me. Couldnt even get Bulbasaur to statically render

  • @havetrustissue8975
    @havetrustissue8975 3 ปีที่แล้ว

    What is Pokemon mean? I thought it would be Pokemon game related app!