Thank you so much. I love the way you share knowledge.
@kidushh4426Күн бұрын
This video helps me a lot man thank you
@FrontendNerd-lg3oh2 ай бұрын
Enjoyed watching brother, Also my fav prophet is Yusuf (p.b.u.h) There entier awesome chapter in the quran about Yusuf peace be upon him lucky you are name after him , i wish my parent gave name Yusuf or Omar
@koranonta808327 күн бұрын
Thank you very much for this superb tutorial
@mateus-dot-cc2 ай бұрын
nice video! optimistic is great I'll try to use
@piyushaggarwal52072 ай бұрын
Hi Youssef! Nice video.
@ThingsTK27 күн бұрын
so useMutationState only return pending user, we should use this with useQuery together? display mutation state while status is penging and after that useQuery will refetch and display real data? thanks
@youssefbenlemlih24 күн бұрын
Yeah you could also do the optimistic updates inside the custom queries
@krishparmar79172 ай бұрын
great 💙
@NiyubwayoIrakozeElie-l8vАй бұрын
Great video! may you also show us how you did backend?
@youssefbenlemlihАй бұрын
So for the backend I used express. The data is saved in memory and not in a db, so it's easy to set up. I used express-validator for validating the request data. You can check it out here: github.com/youssefbenlemlih/react-query-demo/blob/main/backend/routes/index.js
@mohammadabbas16232 ай бұрын
Great
@zeeshan4341Ай бұрын
I just want to ask do we still need some global state management tool for global state like redux toolkit, zustand etc ? and can we use those in combination with recat query ? Also show the getContacts, getContact functions code pls.
@youssefbenlemlihАй бұрын
It depends on the app you're building, and especially WHERE the data is stored. If the data is saved on a backend, and you query it and modify it via API calls, then react-query should be sufficient. If you're dealing with complex client state, where the data is modified on the client, then I would go with RTK & co. Combining react-query with other state management libraries is also easily doable. A common pattern is to have some state stored in Zustand (for example) and passed to a custom query hook as a parameter.
@FrontendNerd-lg3oh2 ай бұрын
Brother can you provide Github link ? Thanks
@youssefbenlemlih2 ай бұрын
Hi! Sure, I just pushed the code to GitHub: github.com/youssefbenlemlih/react-query-demo/