At 44:45 in the video, it's not necessary to create a createRequest function, instead just add a prepareHeaders function to the fetchBaseQuery function as explained here redux-toolkit.js.org/rtk-query/api/fetchBaseQuery#setting-default-headers-on-requests
Please help stuck on this Module parse failed: Unexpected token (51:12) You may need an appropriate loader to handle this file type. const globalStats data?. data?.stats;
Hi, I'm the author of RTK Query. I'm happy that you are using it and creating a tutorial for it. Unfortunately though, that `createRequest` function that you create at 44:45 is a very bad idea. RTK Query already has an abstraction for that - the `baseQuery`. You could just pass the `headers` variable into the `fetchBaseQuery` options, or add a `prepareHeaders` function there. Worst case you need a feature that is not part of `fetchBaseQuery` and you could write a wrapper function around that and create your own `baseQuery`. But you should definitely not call some `createRequest` function in every baseQuery. That is exactly what `baseQuery` is for and why it is being called for every single request that is made. A lot of people seem to base their work on your tutorial, so it essentially spreading a bad practice (and people do not try to understand `fetchBaseQuery` because of it). Could you maybe add an annotation at that timestamp that says to pass `headers` into `fetchBaseQuery` instead?
Please Continue doing this for us! This means a lot to aspiring developers like me. We need more people like you! Thanks so much for all those awesome stuff!!!
@@javascriptmastery Hey, one question. I working on your travel advisor app. I created the google map api key but it isn't working and says in the console that I will need to enable billing cycle. But, in the video you seemed to work with it without doing billing or putting in your credit card. So, why it's not working on my end. IS there any way that I can work with it without putting in any credit card and enable billing. Please reply ...
@@hmshuvo2332 yaa I was also facing the same error....and I didn't want to add a card in billing info that's why I dropped that project .... Do you have any other method to fix the error??
Tip for the new guys, In react-router-dom v6, "Switch" is replaced by routes "Routes". You need to update the import from import { Switch, Route } from "react-router-dom"; to import { Routes ,Route } from 'react-router-dom'; You also need to update the Route declaration from to -from stackoverflow
Stoked to see you using Ant in a project! Thank you for always leaving in the errors and showing us how to fix them. I've learned so much from you doing that.
What a discovery your channel is! Got very handy tips and tricks waiting for a medical appointment. As someone who works maintaining a legacy React project, loved how you explained which parts of useEffect correspond to which lifecycle method on class based components. Really liked your approach to Toolkit, never seen a tutorial address the fetching methods. And a nice introduction to a friendly API. Everything explained in a very didactic manner, with good
I just like the way you make tutorials. You are not afraid of making 2 hour video, where you create a meaningful project, that shows quite a lot of useful features. Keep up the GJ!
I've been following your videos since the beginning of 2021, and now my level on JavaScript has improves, and I am really proud of myself thanks to you ! I wish one day I come to London and give you a hug
Superb and clean explanation.. Thank you Learned a lot of things 1. Redux Usage 2. ANT Design is super awesome and simple 3. Really fast way of implementing things
Hey have you completed the project ......did you face any errors and are there any sub topics like redux that I should learn first before starting this project??
I love this project even though I feel like it takes me 4x as long to code at the pace he does, and still make errors. Nonetheless, I love the projects you build and put on RU-vid. I can't wait to return my invest through your subscription.
Well that's the purpose of coding along. You won't be coding on the same speed with the teacher/mentor - and you will do mistakes. Maybe some times you will spend hours on configuring something of your own preference. But that's alright because that's the purpose of those videos, to make you have a hands-on experience with frameworks/programming languages etc. So even if it takes you 4x times to follow along, thats totally fine and normal. Gz on the experience you got throughout this video, seems so nice! :)
@@christophervradis7285 hey there, I am doing this tutorial right now...and yes it's taking me almost a week but I keep having trouble with the "simplified" operator. It's not responding when I need to toggle between 10 or 100 cyptos. The news is worse...I don't receive any objects, just errors like "too many requests" and "cryptoNews undefined" and I started to pay for the service. I am curious if you had any of these problems?
@@0x0abb hello there. I have not code along this tutorial of @javascript mastery. I just enjoyo watching his videos :) For the toomany requets is probably because of error 429. use Retry-after header. For undefined you are probably accessing a it before initializing it?
May be it will help somebody If you have a problem to show chart at 2:00:33 and have this error : » Error: "category" is not a registered scale » just add on the top this : `import Chart from 'chart.js/auto’`
Sir, thank you so much for your free content. I am unable to buy any course cause my financial condition is not good. I learnt javascript and react from you. I hope one day i will be a great developer like you.
I loved this project ideia!!! But in 44:40 you dont need to create that createRquest helper, just set the headers via prepareHeaders like this: baseQuery: fetchBaseQuery({ baseUrl: process.env.REACT_APP_CRYPTO_URL, prepareHeaders: (headers) => { headers.set('X-RapidAPI-Key', process.env.REACT_APP_CRYPTO_KEY) headers.set('X-RapidAPI-Host', process.env.REACT_APP_CRYPTO_HOST,) return headers } }),🙌🙌
In cryptodetails page line chart is not working properly and time period is not working and date is same in the chart. time in video 1:50:00 Any one please help me...
This is amazing, We really need these kind of tutorials where we can see what we can do with these technologies, Thank you for your amazing content, You have earned a new Subscriber. ❤👏
For them who are looking for the solution of 24hVolume: { title: '24h Volume', value: `$ ${ cryptoDetails['24hVolume'] && millify(cryptoDetails['24hVolume']) }`, icon: , }
Amazing content as usual! I love that your actually putting your content out there for free, it really helps! I would love to see videos about mobile apps! Also, have you tried making games with Python or Unity and C#? I think you would excel at that in no time!
please when i click on a crypto and get to the cryptoDetails, there is an error from the stats/generic statistics arrays that says cannot read property from undefinced(reading "price")...I think the problem here is the arrays look for the cryptoDetails variable before the API is loaded...hOw can i solve that
Job Interviewers: We are going to make life hell for you, there's no way you can show me interesting projects JavaScript Mastery: LET ME INTRODUCE MYSELF
Wow great stuff man, didn't realize redux came out with this new toolkit. I always loved the simplicity of using hooks with graphql. This just made my day!
I've been subbed a while, just wanted to boost the algorithm and say thanks!! Your videos are ALWAYS helpful and never a waste of time, which is what I love most. Consistently amazing content!
What a beautiful and amazing project man!! Thanks a lot, I started to learn JS months ago, I've just finished a bootcamp and thanks to you I learned a lot of stuff that I can add to my kit. Very clean, very well explained. Liked, subscribed etc :)) Can wait to watch your other videos!!
@@venkateshkumar6142 it does work! However, the /exchanges endpoint is only available in the paid subscription, and also you will have to do some tweaks in the CryptoDetails component in order to show the info ;)
@@venkateshkumar6142 it does work! However, the /exchanges endpoint is only available in the paid subscription, and also you will have to do some tweaks in the CryptoDetails component in order to show the info ;)
Hey did you get the chart to change on different time periods. Mine only loads the initial time period and the charts don't change upon changing the time period
Hi I started this project recently and am facing issue in the coinranking api for fetching the coins, seems like they are migrating to V2. If anyone also sees this error let me know if you get any resolution. Thanks in advance.
Update alert! If you are watching this video after the release of react-router v6 (Sept 2022), you won't be able to use Switch component as it has been removed from the react router library. You need to use component instead. Do check out it's syntax. Its a little different.
Thank you for this course, I loved every second of it and learned a ton about the redux tool kit and I plan to make something out of it by God's grace.
Hey man, trying to follow along with this now but I cannot get anything to show up on my pages when clicking on the different routes. I have compared code and cannot figure it out. Would it have anything to do with things being deprecated since this video? Example I had to import styles from antd with - import "antd/dist/reset.css"; - Switch was also changed for Routes as per the new guidelines.
you are my favourite instructor on the internet love your projects. how well you explain the things I will do this project using material-ui. Thank you sir
Navigating the web app is fine until I press on a crypto card to access the CryptoDetails page. A white screen is displayed. I think it has something to do with the red brackets showing up in the code for both CryptoDetails and stats. I can't figure out the issue. Would really appreciate some help?
I just opened my deployed app again and it was showing nothing. Then I opened the coin ranking api page and tested the endpoints. It showed 503 planned brown-out. It also said to migrate to v2 of the api as the v1 will be deprecated. So I have a request if you would show us how to migrate to this other api otherwise this application will not work and will loose its beauty😊
This is where you need to go read the docs and try and figure it yourself. It's hard to start to do, trust me. But that's what real job will be like. You'll have to read other peoples code and update it.
Your tutorial is topnotch from what i'm seeing so far. As a beginner I must say that I'm able to follow every steps with great enthusiasm. However, I do need help in CryptoDetails section as It's showing "undefined" when I click, instead of showing detail of a particular coin. Kindly help out.
nice work but I tried building the app but am having issues with the crytodetails and exchanges after I make a request to the API it returns a blank page even when i copied the exact code i still get the same blank page
Amazing👍 Thank you for creating amazing and value packed tutorials. Seriously I have been following you for a year now. Learnt a lot from you. Thanks ❤
"Failed to load resource: the server responded with a status of 404 (Not Found)", this is what I'm getting instead of an object as a response from the Rapid API, seems like generated API key is invalid but how's that possible, what's the fix for this?