2:49 The result is not JSON, here's a quote from mdn on Response.json(): "Note that despite the method being named json(), the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object." So correct me if I am wrong: the result obtained after the fetch promise has fulfilled, is already in JSON. When you do res.json(), it returns another promise that converts JSON into a JavaScript Object, so you can for example use the dot operator on the data when the returned promise of res.json() is fulfilled. We all are learning! Don't let a mistake like that haunt you Pedro! You've been a great help to me! :)
Hi! I just want to say a big thank you! For my graduation project/bachelor thesis I decided to make an app using React. It was a totally new technology for me and the first app I ever made. Finding your tutorials and videos was been really helpful, they're really easy to follow and your explications and examples are great! I'll have to make sure to go back to every video I watched and leave a like. Good job and hopefully more people will find your channel!
Can you please make a project-based tutorial using the redux toolkit and react query and show how to create industry standard coding and folder structure??
Thank you so much, Pedro, for the video. I have been watching many videos, but yours are by far more helpful. Would you be able to do a tutorial on Nivo charts API integration? This topic is poorly documented and it would help tremendously to have your guidance. I am pretty sure I am not the only one searching for it 😅. Many thanks 😊
React Query is by no means a state solution, also I like your videos but just get to the point, it took you over 4 minutes from the start of the React Query part to even get to the point of React Query
I don't have anything displaying on my browser when I use the Fetch API and Axios API. All my codes are correct just like that of Pedro's. I will appreciate a response
I can see you have the copilot extension, I'm sort of having issues getting my own to work I don't know what I'm doing wrong but it shows the icon as cancelled every time
@@fullfungo I have come a long way😅, at that time such an error gave me headaches now am good at react.js and react native🤣 Thank you for the response anyway.
You can also use SWR config to set a fetcher and set the suspense for all of the useSWR so you can just include the url and nothing else. That’s how this book taught it but I kind of like having the option to change the fetcher.
Hey Pedro, just wanna clarify that in React 18 anytime when there's sth to do with api we no longer need to use useEffect() right? Since React Query benefits our performance better. Honestly I've tried both Pagination and Infinite Scroll in React Query which are really good in React app. However, when I use React Query in NextJs that's where I feel it slows down the app performance a bit.
I mean, it depends on how your app is running. I usually use SWR when im working in a nextjs app and react query when I am not. But both should be good, try to optimize the way your are fetching ur data and see if it is react query that is really causing the issue. For example, are you paginating by fetching data incrementally?
@@PedroTechnologies what do you mean by incrementally? In my scenario, for example Rick and Morty API, when it comes to NextJs the only thing that React Query helps is prefetching data with SSR or SSG. But when clicking to the next new page (which is not the previous data yet) then it renders not as fast as React App. On the other hand, I have also tried to fetch Weather API with React Query in NextJs and it seems quite slow too compared to using only SSR to fetch the data from Weather API