React Query Tutorial with Typescript | Part 2 -- Mutations

  Рет қаралды 13,542

CodeDunks

CodeDunks

Күн бұрын

Пікірлер: 19
@albertdugba
@albertdugba 3 жыл бұрын
The best channels are often the ones that are with less subscribers. Love your content hands downs. Definitely going to like and share
@abdelrahmanabdelatief8375
@abdelrahmanabdelatief8375 2 жыл бұрын
man, this is by far the best react query tutorial I've watched, love the way you present the content and explain it, your videos are fast paced which is so cool. keep it up man, and don't get discouraged by the numbers man you have one of the best youtube channels out there in my opinion, finally thank you so much for your work
@loganj6203
@loganj6203 3 жыл бұрын
Your contents and stacks are what I try to build for my small projects! Thank for all video and I'll keep following it.
@CodeDunks
@CodeDunks 3 жыл бұрын
Appreciate it! Glad I could help
@loganj6203
@loganj6203 3 жыл бұрын
​@@CodeDunks I really lost how mutation works since I watch the invalidate part, I do not understand 2 things that first, the mutate send post data to '/api/person/create' and the person data get data from '/api/person' how the mutate data can affect different domain data? second, the invalidation meaning looks like you wanted to change the data but if you don't want to change, you can cancel the process, is it right explanation? I'm not sure my questions are clear but I really lost.
@CodeDunks
@CodeDunks 3 жыл бұрын
@@loganj6203 the mutation allows you to have multiple sub methods that give you more control over what’s happening. For example if you want to quickly update the frontend with what the “new data” is going to be before it actually completes you can via proactive updates. But let’s say that fails, then you don’t want the data reflected to be wrong right? Since the request didn’t ever complete to the DB you can use the sub methods to essentially “rollback” the changes that didn’t go through. In terms of your domain question I’m not entirely sure I follow what is being asked so I’m sorry I’m not able to better answer but you can modify “/api/person” cache data directly from anywhere that you provide access to the client
@loganj6203
@loganj6203 3 жыл бұрын
@@CodeDunks Thank you for the explanation, I could understand what is the mutation clearly. What I was confused about the domain that the mutation send a request to '/api/person/create' and the person useQuery send a request to '/api/person' but how they can share the person data between them, but I think it was just you wanted to show that how invalidation works so I understand the flow right now. I really appreciate your videos!
@가가가가아이고가가가
@가가가가아이고가가가 Жыл бұрын
Thank you ! What a useful video !!!
@alfieqashwa
@alfieqashwa 3 жыл бұрын
Subscribed and liked. My feedback is... :Clould you please slow down a little bit?". I'm from Indonesia and English is not my native language. But thanks for this provided typescript using react-query. So much appreciate it.
@Pedro-yo4hr
@Pedro-yo4hr 2 жыл бұрын
Thanks for the amazing video! I was wondering if you could tell me why do we need those 3 arguments on the onSuccess if we aren't using them. Are they optional? Also, what's the meaning of the underscore on _variables and _context? Thanks!
@stevereid636
@stevereid636 2 жыл бұрын
I realised that I needed to learn a bit more about React Query and this series using Typescript is perfect. One thing though is there a reason you're using React.SyntheticEvent in the onSubmit function instead of React.FormEvent?
@alirezavahidi8880
@alirezavahidi8880 3 жыл бұрын
Thanks a lot Leo, everything was great. The only problem is that you scroll up and down too much within the VScode and I personally get confused! :D
@CodeDunks
@CodeDunks 3 жыл бұрын
Sorry about that! Will keep that in mind moving forward, thanks for the heads up!
@taetaebeatz5578
@taetaebeatz5578 3 жыл бұрын
You should link pt1 in this video!:)
@ahmedshehata5601
@ahmedshehata5601 2 жыл бұрын
what about if I have 4 functions each one doing some logic like update item / delete item / addItem how do toggle btw these in useMutations()
@jesusmendoza7774
@jesusmendoza7774 3 жыл бұрын
do you know how to type error when using mutation and react-query?
@CodeDunks
@CodeDunks 3 жыл бұрын
I came across this stack overflow that might be of some use. stackoverflow.com/questions/67828232/react-query-mutation-error-not-recognized-as-type-error
@andrearossi2770
@andrearossi2770 2 жыл бұрын
your knowledge is good but you really need to work on your wording and speech skills , 70% of your words are "actually" and "kind of" , might throw some people like me off
@CodeDunks
@CodeDunks 2 жыл бұрын
Appreciate the feedback Andrea! I agree and will try my best moving forward!
React Query Tutorial with Typescript | Part 3 -- QueryClient
16:43
Five Clever Hacks for React-Query and SWR
40:09
Jack Herrington
Рет қаралды 60 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 26 МЛН
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 185 М.
Why I avoid useEffect For API Calls and use React Query instead
17:45
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 88 М.
React Query Tutorial - 21 - Mutations
9:11
Codevolution
Рет қаралды 96 М.
React with TypeScript Crash Course
1:07:05
Laith Academy
Рет қаралды 240 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 154 М.