ReactJS Tutorial - 42 - HTTP GET Request

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

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

  • @lizplord
    @lizplord 3 года назад +10

    JUST KNOW IT!!!
    You're freaking mind-blowing and genius my man!

  • @allansarion7118
    @allansarion7118 4 года назад +9

    Like your videos, I so love when a teacher provides summary of what he has discussed. Thanks!

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

    These videos have been so helpful, I cannot thank you enough Vishvas!

  • @codchamp8508
    @codchamp8508 3 года назад +6

    Best tutorial always on the point and gives clear explanation

  • @zarkoboyadjiev3061
    @zarkoboyadjiev3061 4 года назад +8

    You can use "condition && code to execute"
    instead of ternary operator with null for false
    like in "posts.length ? code : null"
    and errorMsg ? code : null

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

    nice today i came across another great react teacher who has solved my doubts .... subscribed as well as liked and has also shared it with my fellow dev friends

  • @mosescodes3677
    @mosescodes3677 5 лет назад +7

    this is amazing!! helped me so much

  • @culturapoliticaycomputador9999
    @culturapoliticaycomputador9999 4 года назад +1

    Excellent video sir! Thank you

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

    Thank you vishwas

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

    God bless you richly. You have helped me and my career. Thank you very much

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

    Module not found: Can't resolve 'axios' in 'D:
    eact\hello-world\src' i am getting this error

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

    the variable name 'posts' and variable in constructor state 'posts' .. do both names should be same ? more over errorMsg also ?

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

    i got an error:"Unhandled Rejection (TypeError): Cannot read property 'catch' of undefined"

  • @farima-jaberi
    @farima-jaberi 3 года назад

    the best , thanks for this video

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

    Thanks for the video! it is very helpful!

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

    It through as an error - TypeError: cannot read property 'length ' of undefined , how to resolve it

    • @umedsingh8437
      @umedsingh8437 4 года назад +9

      write posts && posts.length ? instead of just posts.length as it will also validate that number of posts are defined or not

    • @NishantKumar-gt5wj
      @NishantKumar-gt5wj 3 года назад +1

      @@umedsingh8437 thanx brother but why can you explain please..??

  • @Aditya.Santra
    @Aditya.Santra 3 года назад

    Very Helpful Video

  • @swapnilchaudhari857
    @swapnilchaudhari857 5 лет назад +2

    while making get request using axios, it shows error " No 'Access-Control-Allow-Origin' header is present on the requested resource.". I solved this by adding CORS extension in firefox but this is not a good option to do it.

    • @AG-gd5qg
      @AG-gd5qg 5 лет назад +3

      hi, try this:
      get.(url, { 'headers' : { 'Access-Control-Allow-Origin' : '*'}})

    • @NicolasLucero
      @NicolasLucero 4 года назад +1

      This is due a cross origin server problem. When you access from a front-end server like localhost:3000 to a back end server like localhost:8080, the server tells you are trying to access to 8080 from a different server and it blocks your request.
      You have to configure what front end servers are allowed on your backend server.

    • @muhammadareebsiddiqui5505
      @muhammadareebsiddiqui5505 4 года назад +1

      If your backend is written in nodeJS then use CORS middle ware to solve this iusse.
      app.use(cors()).

  • @chilukanand
    @chilukanand 7 месяцев назад

    @codevolution - Is there a tutorial for creating an API instead of using it?

  • @AbubekerBedilu
    @AbubekerBedilu 11 месяцев назад

    Hey man, why are you not using functions instead of classes?

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

    Superb ...........!!!👌👌👌👌👌👌👌👌👌👌👌👌👌

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

    TypeError: Cannot read property 'length' of undefined

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

      Please provide more info about your error

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

    Can anyone please help me how to get single data from get request
    Means /posts/1 where 1 can be 2 3 ... passing a variable and works according to the id ??
    Please help me I am in real trouble I need to submit my project this week

  • @siddheshb.kukade4685
    @siddheshb.kukade4685 4 года назад

    Thank you

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

    How do you render nested arrays though?

  • @jagdishshetty4782
    @jagdishshetty4782 5 лет назад

    Thx !!! Great explanation !!!

  • @Sivakumar-sy3bc
    @Sivakumar-sy3bc 4 года назад

    Awesome..., Thank you

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

    I just wanted to know where "react routers" has been covered?

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

      bcuz, react router is not part of react. its external

  • @yathrebamarneh3857
    @yathrebamarneh3857 4 года назад

    Thank you too much

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

    u r awesome Man

  • @twinklekhandelwal4940
    @twinklekhandelwal4940 5 лет назад

    nice videos it is very useful for me

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 3 года назад

    Awesome

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

    Just wonder can we use componentWillMount instead componentDidMount, so that it doesn't have to rerender bcs the state is changed?

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

      componentWillMount() ,This is not a safe method according to the official reactjs documentation

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

      @@chirashankar4495 can u refer it to me pls?

  • @mlarra
    @mlarra 5 лет назад +1

    Hi there! how could i add the rce to create classes faster? Mi visual studio code doesn't have it

    • @karthikhr864
      @karthikhr864 5 лет назад +5

      go to settings and choose extensions in it and type ES7 and that snippet to it. Enjoy using s
      snippets

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

      Go to Extension Tab and Install ES7 React, Readux,GraphQL Snippets

  • @mercykannan9547
    @mercykannan9547 4 года назад

    how to limit the API call? like per call first 10 then for the next call the next 10 and finally call should stop after completion.

    • @mercykannan9547
      @mercykannan9547 4 года назад

      @Borisov Alexander For making a scroll effect... on the first page only 10 should appear, then while scrolling to the bottom page the next 10 should appear.. as like our Facebook notifications page

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

    5:55 Summary

  • @siemen_subbaiah
    @siemen_subbaiah 4 года назад

    Sir, is the super keyword deprecated now ? cause in VS Code,it gives a message as such!

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

      super(props) is mendetory if using a constructor

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

      It is used when we use constructor

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

      @@kushagragupta4363 ha 9 months ago I was a complete beginner.
      Now after all these months. I never class based component in any of my projects.
      But it's a good thing to know!

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

      @@siemen_subbaiah wow brother can you tell me which projects should I make If I am beginner in react js

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

      @@kushagragupta4363 if your a beginner do some api fetching projects like use a any movie api and make a project on that.
      Or make a expense tracker or a basic to-do list.
      In general any project by utilizing am external public api

  • @mickeymahajan7566
    @mickeymahajan7566 4 года назад

    How to access nested objects in JSON

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

    where can i get this program code

  • @DurgaPrasad-kj2cj
    @DurgaPrasad-kj2cj 4 года назад

    Post is undefined in map method... What's the problem? Anyone plz

    • @jonesquartey5118
      @jonesquartey5118 4 года назад

      1. destructure posts from this.state
      2. make sure it starts with a small p,

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

      if it confuses u then use any other variable and make sure u use the same variable inside map method too 👨

  • @teveta100
    @teveta100 4 года назад

    How do you get one single item (object) from array?

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

      posts array contains an array of objects so u can simply access any one of them by its id as there is an id property in each objects .. just use map method to loop through each item and return it if its id matches with ur desired id and break the loop ..is there any other method pls let me know ..

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

      @@noobCoder26 thank you for your reply. There is also lodash get() method which does the job very well :)

  • @cumalitezcan9567
    @cumalitezcan9567 5 лет назад

    Thank u man (y)

  • @deaw61011
    @deaw61011 5 лет назад

    how to react build for iis server?

  • @mujahidhussain133
    @mujahidhussain133 5 лет назад

    Can't we use XMLhttprequest object ??

    • @faruzzy
      @faruzzy 5 лет назад

      You can if you want

  • @chetankumars333
    @chetankumars333 5 лет назад

    How to store the response in a cache for the certain time

    • @paolo-1283
      @paolo-1283 4 года назад

      try the localStorage

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

    why get response two time ???!!

    • @arochomsky9254
      @arochomsky9254 Год назад +2

      in the index.js file, it has an option for development that says something like you have to choose another mode, because in this mode, it renders all twice, but it does make anything fail, if you wanna know.

  • @alexeymishenko9996
    @alexeymishenko9996 4 года назад

    your exmaple return Uncaught SyntaxError: expected expression, got '

  • @nomadic_shrek
    @nomadic_shrek 4 года назад

    How to use this with authentication

  • @natqe4049
    @natqe4049 5 лет назад

    why not in the constructor?

    • @faruzzy
      @faruzzy 5 лет назад

      It shouldn't have any side effects, it should only initialize values

    • @LogeshSLohit
      @LogeshSLohit 5 лет назад

      Document itself asks us to call Ajax requests inside componenDidMount mtd

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

      side effects must be done inside componet did mount not inside constructor

  • @amansharma2408
    @amansharma2408 4 года назад

    i am getting an error that "can't resolve module axios", please help

    • @YashPandey_the_emperor
      @YashPandey_the_emperor 4 года назад +2

      open up the terminal in the same directory as App.js and issue the command "npm install axios"

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

    6:39 error message

  • @jackmoore4870
    @jackmoore4870 4 года назад

    your voice is not stable