React Query
Project Setup 1) Wrap entire app.js with QueryProvider 2) New create instance of QueryClient and add it to client as shown in video #LEARN BASIC QUERY 1) a) Import useQuery and axios b) Use useQuery with a key which needs to be unique and return the result c) We get lots of value upon a execution of useQuery so we destructure and get only the two value mentioned. Please note that we have to atleast get two value d) While loading use isLoading flag and for fetching data use data flag If we had use useEffect and state than the code would had been much more so first advantage of this. Common pattern also use is that using fetcher function as seperate function.Please note use the function inside RQSuperHero... ! As an improvement its better if you put fetchSuperHeros function inside RQSuperHeroesPage component with usecallback instead of outside component. but I think this is done to help decouple the two functions. If you moved the fetchSu...