Тёмный

React Query Tutorial - 21 - Mutations 

Codevolution
Подписаться 648 тыс.
Просмотров 90 тыс.
50% 1

📘 Courses - learn.codevolution.dev/
💖 Support UPI - support.codevolution.dev/
💖 Support PayPal - www.paypal.me/Codevolution
💾 Github - github.com/gopinav
⚡️ Checkout Taskade! www.taskade.com/
To upgrade any workspace, login and visit www.taskade.com/billing
Use coupon code: CodevolutionRU-vid for any workspace upgrade. Select "Add promo code" on checkout, enter the code, then hit "Apply". This will apply a 100% OFF lifetime discount to your subscription. Enjoy and feel free to invite others to your workspace!
📱 Follow Codevolution
+ Twitter - / codevolutionweb
+ Facebook - / codevolutionweb
📫 Business - codevolution.business@gmail.com
React Query Tutorial on Mutations
Mutations with React Query

Опубликовано:

 

23 окт 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 45   
@lfbarni
@lfbarni Год назад
I am just missing an example of a add hero hook versus an edit hero hook. Would you add and edit the hero on the same hook or would you create separate hooks for each matter?
@TheScottShepard
@TheScottShepard 6 дней назад
Thanks so much! I’ve been tearing my hair out for days over useMutation. This is a perfect explanation
@lappiable
@lappiable Год назад
I mean what a quality content. Hats off to you man ✌️
@danukr4294
@danukr4294 Год назад
I'm very grateful, because this video is very easy to understand and all the code is very few and simple
@thecodelife9855
@thecodelife9855 2 года назад
can I post data on jsonplaceholder fake api ? and how to I view the data posted by me in that case ?
@utkarshyadav6586
@utkarshyadav6586 Год назад
Cannot destructure property 'mutate' of '(0 , _components_api_query_hook__WEBPACK_IMPORTED_MODULE_3__.useAddProjectData)(...)' as it is undefined , Getting this error
@bomul0524
@bomul0524 Год назад
there's no error when doing like this, is this right way? const { mutate: addHero, isLoading: heroIsLoading, heroIsError, heroError } = useAddSuperHeroData();
@boongboong01
@boongboong01 2 года назад
This is a really, really useful video. thank you
@kikiken4287
@kikiken4287 Год назад
화이팅!
@ghaidam9749
@ghaidam9749 8 месяцев назад
is mutation same as mutant query plans?
@user-zd1dt7tz1u
@user-zd1dt7tz1u 8 месяцев назад
Exercise worked for me as long as I used an alias. Added loading and error messages at the end of the page.
@Slimgoodie0216
@Slimgoodie0216 2 года назад
If you had a bad network connection could it take a little while for the newly added hero to show up in your list, or does it add the hero to a locally stored heros list?
@funkahontas
@funkahontas Год назад
when you use the queryClient.setQueryData() it updates instantly because it adds it to the cache.
@132_abhishekpethe7
@132_abhishekpethe7 3 месяца назад
You didn't use enabled : false in useQuery , but still It fetched data after clicking the Fetch Heroes button, how ?
@user-hl1nt5sp4u
@user-hl1nt5sp4u 3 месяца назад
쉽게 설명해주셔서 감사합니다~:)
@statecznylukas
@statecznylukas Год назад
I'm using typescript and desctructuring the hook where I use mutate doesn't give me access to mutate. It says "Property 'mutate' does not exist on type..." It also doesn't give me access to isLoading, isError or error props.
@statecznylukas
@statecznylukas Год назад
Found the error. I was using async before the function. Got rid of async and now I have access to the values.
@RubberDuckCoding
@RubberDuckCoding 2 года назад
VERY NICE!
@ivanpetrovic6209
@ivanpetrovic6209 2 года назад
I don't need to send id, JSON server make one automatically?
@rubendacostaesilva8442
@rubendacostaesilva8442 Год назад
Yes
@codewithrosharana
@codewithrosharana Год назад
Plz sir help in patch request
@ramendersingh3072
@ramendersingh3072 2 года назад
What is the advantage of handling mutations via React Query?
@shri1897
@shri1897 2 года назад
Cache invalidation and getting error and loading state without extra work
@owltrades
@owltrades 2 года назад
Good question
@asifuzzamanbappy1297
@asifuzzamanbappy1297 Год назад
sounds like its these and as such could be it `const { mutate: addNew, isLoading: heroAdding, isError: addingError, error: addErr } = useAddNewSuperhero()`
@milanpoudel7212
@milanpoudel7212 2 года назад
But I didn't understand the benefit here of using mutations. You are again clicking fetch to get that updated list...Isn't it? Which means again sent the get rquest to get all lists by clicking on fetch all
@ManpreetSL
@ManpreetSL 11 месяцев назад
This is just the first part of using mutations. The next video goes through invalidating queries, which will auto-refetch when a corresponding mutation runs.
@kristijanlazarev
@kristijanlazarev 9 месяцев назад
Thank me for watching? Thank you for being a god
@mrrishiraj88
@mrrishiraj88 2 года назад
Good Day
@trantuanat524
@trantuanat524 Год назад
nice
@PreparingGeneeskunde
@PreparingGeneeskunde 2 года назад
What does this mean: const hero = { name, alterEgo } ?
@allone258
@allone258 2 года назад
const [name, setName] = useState() const [alterEgo, setAlterego] = useState() { [propertyName] : [value/variable] name: name, or name, alterEgo: alterEgo or alterEgo }
@trindadematheus
@trindadematheus 2 года назад
i love you
@ishumishra8104
@ishumishra8104 6 месяцев назад
First you should make everyone understand why we are using mutation. As we can simply call post api and fetch data and append it,then why we have to use mutation.
@usmanmughal5916
@usmanmughal5916 2 года назад
How many more videos until playlist is completed? And feeling sorry for India, Pakistan Zindabad 😁
@jenilkathiriya9066
@jenilkathiriya9066 2 года назад
And feeling sorry for pakistan india Zindabad ok
@alishmadhukar2177
@alishmadhukar2177 Год назад
India zindabad tha hai aur rahega .......
@usmanmughal5916
@usmanmughal5916 Год назад
@@alishmadhukar2177 sorry India, pehle semi final to jeet lete phir baten chod tay
@RaghavSharma-xp2oj
@RaghavSharma-xp2oj Год назад
@@usmanmughal5916 this was not at all required here brother. Sick. You were here to study right? Infact I am here for the same. Ugh, leave. God bless you.
@sumitwadhwa8823
@sumitwadhwa8823 2 года назад
sounds like you're reading from a teleprompter
@aliarslanansari
@aliarslanansari Год назад
He is just speaking slowing in a consistent speed, so that its understandable for non english speakers
@asifuzzamanbappy1297
@asifuzzamanbappy1297 Год назад
solution spoilers const { mutate: addNew, isLoading: heroAdding, isError: addingError, error: addErr } = useAddNewSuperhero() if (isLoading || isFetching || heroAdding) return Loading.... if (isError || addingError) return {error.message || addErr.message}
@z-onealdo6131
@z-onealdo6131 6 месяцев назад
Terrible explanations and examples
Далее
React Query Tutorial - 22 - Query Invalidation
3:39
Просмотров 38 тыс.
React Query - Complete Tutorial
18:57
Просмотров 108 тыс.
Недооцененный котел в Симс 4
00:37
React Query tips from the maintainer @tkDodo
16:19
Просмотров 21 тыс.
Goodbye, useEffect - David Khourshid
29:59
Просмотров 496 тыс.
The Story of React Query
8:55
Просмотров 95 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 464 тыс.
Learn React Query In 50 Minutes
51:09
Просмотров 278 тыс.
ALL React Hooks Explained in 12 Minutes
12:21
Просмотров 98 тыс.
React VS Svelte...10 Examples
8:35
Просмотров 534 тыс.