Тёмный

What is React Suspense? (including Suspense for Data Fetching) 

Philip Fabianek
Подписаться 8 тыс.
Просмотров 18 тыс.
50% 1

In this video, we will learn what is React Suspense, how to use it with React.lazy() and how to use it for data fetching. We are also going to build a small app for fetching posts that will make use of Suspense for data fetching and we create a "skeleton screen" as a fallback.
Suspense was added to React in version 16.6 and it was initially used for lazy loading with React.lazy(). However, its potential was much higher. The React team realized that Suspense could be theoretically used for data fetching aswell, especially because of React Fiber and the Concurent Mode. Sadly, this turned out to be much more complicated. Although Suspense for data fetching still isn't part of the stable release, it looks like it may finally be added in React 18.x. More importantly, we can play around with it using the experimental release of React and that is what we are going to do.
Suspense with React.lazy():
codesandbox.io/s/cdsox
github.com/philipfabianek/sus...
Suspense for Data Fetching:
codesandbox.io/s/u9qq7
github.com/philipfabianek/sus...
My Video about React Fiber:
• What Is React Fiber? R...
Timestamps:
0:00 What is React Suspense?
0:41 Suspense with React.lazy()
1:58 Suspense for Data Fetching
3:35 Creating App with Suspense for Data Fetching
6:42 Styling the App
7:36 Skeleton Screen
9:16 Animating Skeleton Screen
11:25 Adding User
12:28 Ending
Social Media:
►Twitter: / philip_fabianek
►LinkedIn: / philip-fabianek
►Website: www.philipfabianek.com
►GitHub: github.com/philipfabianek
Music:
- Markvard | Reflections
• Reflections - Markvard...
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
- MusicbyAden | Desire
• Desire - MusicbyAden (...
Creative Commons - Attribution-ShareAlike 3.0 Unported - CC BY-SA 3.0
- Nomyn | Flow
• Flow - Nomyn (No Copyr...
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
#ReactJS #ReactDeepDive

Наука

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

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@aneeqak
@aneeqak 2 года назад
I came for 'React Suspense' but I learned about react skeletons, now I am going to implement it in my project. Thanks!
@user-lm6hy6oy5w
@user-lm6hy6oy5w Год назад
Fantastic work, great explanation and straight to the point! kudos
@Noam-Bahar
@Noam-Bahar 5 месяцев назад
Great video! This really cleared up a lot of misunderstandings I had about React Suspense. Now that it's in a stable version I'll try experimenting with it 🚀
@gawwad4073
@gawwad4073 Год назад
Very informative with no boilerplate. Thank you!
@robin9436
@robin9436 2 года назад
I didn't know about pretty much anything you have shown. Learned a ton, thanks 👍
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you for watching!
@samartajshaikh2601
@samartajshaikh2601 2 года назад
Not at all fast, the speed is just right. Also that extra treat of skeleton screen is top notch. Not many use CSS for loading screen and animation, people usually go with GIFs for that. Really appreciate your efforts on that.
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you!
@fahim4554
@fahim4554 5 месяцев назад
Great 👍. It helped a lot
@FaisalAmin001
@FaisalAmin001 Год назад
Best playlist ❤ Thanks for the effort 👏👏
@PhilipFabianek
@PhilipFabianek Год назад
Thank you for watching!
@tanu6011
@tanu6011 2 года назад
No, it isn't too fast.Liked the new approach. Thanks for the video.
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you for the feedback!
@user-wh1pb7jn8f
@user-wh1pb7jn8f Год назад
it's goooooood. you are best tanks
@programmingwithnit5308
@programmingwithnit5308 Год назад
Thank you so much
@umairqamar2672
@umairqamar2672 Год назад
you are amazing man !
@PhilipFabianek
@PhilipFabianek Год назад
Thank you
@PhilipFabianek
@PhilipFabianek 2 года назад
Tried to do something fast-paced 🔥for once. What do you think? Do you like it? Is it too fast? Let me know in the comments!
@robin9436
@robin9436 2 года назад
Speed was great and not as fast as eg. fireship. But this way I didn't have to rewatch parts of it!
@antonrusak3207
@antonrusak3207 2 года назад
Well I personally prefer the older pace. But this is still fine.
@Gszada
@Gszada 2 года назад
Great keep it up
@user-oy4kf5wr8l
@user-oy4kf5wr8l 2 года назад
Really top quality video! Thanks Philip, hope u could make more videos like this ! 👍👍👍👍👍👍👍👍👍👍👍
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you!
@user-oy4kf5wr8l
@user-oy4kf5wr8l 2 года назад
@@PhilipFabianek I have a question Philip, plz. Since we have a lot of utils that we could use for CSS, eg React UI. What CSS skills do we need to master? Does this subject interest you? I always find CSS super annoying..😭
@PhilipFabianek
@PhilipFabianek 2 года назад
Every frontend developer should have a good knowledge of CSS. It is quite annoying at first but eventually you get used to it.
@antonrusak3207
@antonrusak3207 2 года назад
What software do you use for presentations? Looks awesome!
@PhilipFabianek
@PhilipFabianek 2 года назад
I use Adobe Premiere Pro for video editing.
@mohamedyoussef8835
@mohamedyoussef8835 Год назад
Awesome video ++++++++++ 🙂
@user-hv9vv4dz6p
@user-hv9vv4dz6p 2 года назад
Its very useful 👍👍👍
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you!
@ayocodes301
@ayocodes301 2 года назад
great content
@PhilipFabianek
@PhilipFabianek 2 года назад
Thank you!
@fltngmmth
@fltngmmth 2 года назад
React 18 for the win
Далее
What Is React Fiber? React.js Deep Dive #2
18:56
Просмотров 55 тыс.
Why use Next.js?
9:26
Просмотров 4,7 тыс.
React vocab explained: What is Concurrent React?
17:14
The Story of Concurrent React
11:59
Просмотров 159 тыс.
React Query Makes Writing React Code 200% Better
13:54
Просмотров 178 тыс.
How a React App Works Under the Hood
14:18
Просмотров 56 тыс.
How React ACTUALLY works (DEEP DIVE 2023)
12:59
Просмотров 51 тыс.
How does react Suspense work?
10:37
Просмотров 23 тыс.
This One Line Of Code Catches React Bugs For You
15:55
iPhone 16 - КРУТЕЙШИЕ ИННОВАЦИИ
4:50
Телефон в воде 🤯
0:28
Просмотров 1,2 млн