Custom fetch hook that works with React Suspense

preview_player
Показать описание
In this video we'll dive deep into suspense, creating a custom hooked called useFetchSuspense that will make an AJAX call with fetch, playing nicely with Suspense to handle showing the loading fallback component while the call is being asynchronously executed. If you are new to Suspense, please check out my first 2 intro videos covering the basics of Suspense and using Suspense with @reach/router.

Рекомендации по теме
Комментарии
Автор

Thank you for this video, the intentional lack of documentation about this just drove me crazy, your explanation is simple and easy to understand

PatrikTheDev
Автор

Thank you, ```throw promise``` was exactly what I was looking for! Didn't know how to display the same fallback for the code splitting and data fetching inside the same suspense.

vladislavryabinin
Автор

Impeccable Leigh! Really well explained and comfortable to follow, especially with the revision at the end walking us through the process/flow. Thank you.

maxiequa
Автор

Wauw, this 3th one wasn't easy, specially with you improvising, a lot of concepts to grasp. Thanks Leigh

RuudvanZuidam
Автор

Thanks Leigh! I really enjoy your teaching style.

charliecooper
Автор

You make pretty easy to understand everything, great content!

panamatsu
Автор

Seriously great vid. The flow chart diagram helped a ton.

nateo
Автор

Thanks a lot for this nice Video, Suspense with Fetch Demistified! Great Carry on !

DeepakKapiswe
Автор

Thank you for your video. Now i understand more the use os suspense.

tiagoagm
Автор

Nice Video! Really great job here! Just a question: how can you handle errors with this approach?

davidesantimaria
Автор

I love your video tutorial so much, May I know what is the font-family of VS code?

kenling
Автор

thanks, that was great
do you have tutorial about HOC ?

rossostudio
Автор

Thank you for amazing video. Did you or anyone use this code in production?

markovicrdejan
Автор

Hey man! I can't figure out how to write tests for this hook. Would you mind writing a test or two using jest and react testing library?

CodeDexterity
Автор

Hi! Thank you for that great concept. Have you tried to implement something similar when using redux? Would that be possible?

bartoszsobieraj