Тёмный

React Suspense Introduction (Data Fetching) 

Traversy Media
Подписаться 2,2 млн
Просмотров 93 тыс.
50% 1

In this video we're just going to experiment with React Suspense data fetching. Suspense is still an EXPERIMENTAL FEATURE at this time.
Sponsor: Freelancer Bundle (Promo: TM25)
gumroad.com/a/179156083
Suspense Docs - reactjs.org/docs/concurrent-m...
Concurrent Mode Docs - reactjs.org/docs/concurrent-m...
💖 Become a Patron: Show support & get perks!
/ traversymedia
Website & Udemy Course Links:
www.traversymedia.com
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia

Наука

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

 

21 ноя 2019

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 110   
@TheAJMarketing
@TheAJMarketing 4 года назад
I don't use react but liking and leaving a comment on your video is the least I can do. Longtime fan. Keep up the good work.
@TraversyMedia
@TraversyMedia 4 года назад
Thanks bud, I appreciate that :)
@TheAJMarketing
@TheAJMarketing 4 года назад
@@TraversyMedia Could you please look into Cubejs, the documentation is pretty limited. And if you could do a Realtime Dashboard with Angular & Cubejs that will be awesome.
@w3slley_
@w3slley_ 4 года назад
Just came by to thank you for all your great free content, Brad. You are really helping a lot of people.
@TraversyMedia
@TraversyMedia 4 года назад
Thank you :)
@davidwelsh8387
@davidwelsh8387 4 года назад
I love how you had a "What the Hell did I just do?" moment during this video! So relatable.
@bobbyboxer2664
@bobbyboxer2664 4 года назад
Brad always reading our minds. Just what my job started using and I had NO CLUE what it was. I do now 😏 thanks Brad!!! 🔥
@davidnichol4735
@davidnichol4735 4 года назад
I'm so glad this came out just now! I'm building a web app for a client who basically needs everything dynamically fetched, and this should make it soooooo much less painful handling the loading state.
@galeontiger
@galeontiger 4 года назад
Who the hell dislikes a Traversy video?
@miclemabasie4424
@miclemabasie4424 4 года назад
WHOOOOO????????
@LEGnewTube
@LEGnewTube 4 года назад
People who understand it as 'dis I like'.
@theguyfromsikkim5786
@theguyfromsikkim5786 4 года назад
Techlead's followers 😂😂
@miclemabasie4424
@miclemabasie4424 4 года назад
You're always just making us wanna learn like non stop Mr BRAD tanks a lot and may GOD bless you more and more.
@jubiliudu
@jubiliudu 3 года назад
I love this guy. Your classes are amazing!! Keep doing this.
@JoeWong81
@JoeWong81 4 года назад
Thanks for the intro Brad. Always good to know what's coming up in React world
@austinmallar5430
@austinmallar5430 4 года назад
You explained this SO well.
@laurakraman2737
@laurakraman2737 4 года назад
Love your content! Thanks for keeping me from getting fired.
@amitkinor
@amitkinor 3 года назад
thank you very much. all your videos are extremely helpful. thank you for your time invested in creating them.
@troygooden2525
@troygooden2525 4 года назад
This was super easy to understand, thank you
@nicholasbernard2315
@nicholasbernard2315 4 года назад
Thanks for taking the time to go through this.
@tommygrimes3844
@tommygrimes3844 Год назад
Great tutorial. All of his videos are outstanding.
@xXHelsingGamingXx
@xXHelsingGamingXx 2 года назад
Just now thinking about this topic and here it is! 🙂
@samuellucas7049
@samuellucas7049 4 года назад
Thanks for this bro... You're the best
@ollystoppa9155
@ollystoppa9155 4 года назад
I thought react suspense was that feeling you get when you're trying to finish at least one component before they have a major update.
@kirant9339
@kirant9339 4 года назад
Just I want to say thank you for your time and valuable video very useful
@krowwweee2918
@krowwweee2918 4 года назад
Great content as always.
@muhammadsalman6746
@muhammadsalman6746 3 года назад
thanks man! loved it.
@anilanaparthi6985
@anilanaparthi6985 4 года назад
Brad is a great person !
@BurgerAndDrink
@BurgerAndDrink 4 года назад
thanks traversy!!
@amrmoneer5881
@amrmoneer5881 4 года назад
My favorite coder
@GauravSingh-st5sd
@GauravSingh-st5sd 4 года назад
A video series on React PWA will be really helpful. Thanks for all your efforts btw.
@aldocaamal7740
@aldocaamal7740 4 года назад
React already comes with PWA integration, you just need to build for production and test it using a server like http-server www.npmjs.com/package/http-server
@abeprangishvili
@abeprangishvili 4 года назад
you are the best!!!!
@bhaveshpanchal5835
@bhaveshpanchal5835 4 года назад
Thanks sir! Are you planning on any react native course?
@MRStik-px2ye
@MRStik-px2ye 4 года назад
Thank You Thank you im new to the channel, and new in web design / development (this is my 3rd week), i have my first course ever on udemy, your course modern html/css , and i love it. Im by the news grid project in the course :), and planing to take the jave script after Thank you very much greatings from "Vienna"
@TraversyMedia
@TraversyMedia 4 года назад
console.log(`You are welcome!`);
@theemacsen1518
@theemacsen1518 4 года назад
Traversy Media alert('haha thx for eveything Brad!')
@gambomaster
@gambomaster 4 года назад
You are not closing the h1, h3 and p tag correctly. You also forgot to include the CSS file. '.color' class will not change the properties of text inside the span tag. 😀
@MRStik-px2ye
@MRStik-px2ye 4 года назад
@@gambomaster 😁you right
@bibibobs
@bibibobs 4 года назад
Cringe...
@peppeAug
@peppeAug 4 года назад
Hi Brad, would you make a tutorial on how to bundle nodemailer and react to make a working form? Thank you so much.
@jeeves251
@jeeves251 4 года назад
Thank you!
@harveys2631
@harveys2631 4 года назад
can you do an aws based event recommandation project ?
@nanonkay5669
@nanonkay5669 4 года назад
This looks like a lot more work than just to use if statements
@ShubhamDeol
@ShubhamDeol 4 года назад
vs code auto import imported this wrap thing in your code. I wish there was any way to customize vs code auto imports. I had a colors object stored in my theme.js file, everytime whenever I type Colors in my code it auto imports Colors from somewhere inside node modules.
@RohitKumar-mn9oi
@RohitKumar-mn9oi 4 года назад
sir I love your video let me see this ...love u sir you are God for me sir I am a 3rd year btech student tell me about the projects sir pleaseeeeee
@EmiliaKaida
@EmiliaKaida 2 года назад
What does it mean by "throw suspender" ? We know about throwing exceptions, but what's throwing the promise doing ?
@MrRades123
@MrRades123 4 года назад
"Too much node". Yesterday I saw that es6 modules are officially part of Node. You don't have to use common js
@QuocVietLikeTech
@QuocVietLikeTech 4 года назад
Thanks for shared
@irsathkareem7513
@irsathkareem7513 4 года назад
Please make a video on how to use gmail api for sending messages from nodejs backend
@Gentarozzo
@Gentarozzo 4 года назад
So finally we don’t have to manage loadings anymore... thanks god!
@avi7278
@avi7278 4 года назад
What? Replacing 1 line of code with 100 lines of boilerplate is a "thank god"? Thank god I dont work with those kinds of developers.
@Gentarozzo
@Gentarozzo 4 года назад
@@avi7278 Thank God I don't work with boring elitist like you... and Thank God not lots of people will in future.
@royjiny
@royjiny 4 года назад
Does it also apply for React Native the same way?
@mayassalman
@mayassalman 4 года назад
Thanks Brad.. what about something about blockchain..!😁
@playstore-so2xm
@playstore-so2xm 4 года назад
Sir, Could you make a tutorial playlist on Wordpress for making an E-commerce website and deploying it? Please fulfill my wish. I am your regular viewer, subscriber and a great fan of your art.
@mouadtaoussi42
@mouadtaoussi42 4 года назад
Thank You Brad! PS : When You'll Release ( Web Development In 2020 - A Practical Guide )?
@TraversyMedia
@TraversyMedia 4 года назад
Working on it now. By 2020 :)
@lekkyjayz6294
@lekkyjayz6294 3 года назад
@11:40 Can anyone please point out which dot then is catching the suspender or result error???
@connormilliken8347
@connormilliken8347 4 года назад
Just wanted to say I've always really enjoyed your videos, so much so that I reference your channel in the book I just wrote. It was released recently. It helps to teach beginners and intermediate level programmers learn Python and some Analytics libraries. Feel free to check it out. You can find the shout out on page 322. Thanks!
@creative-commons-videos
@creative-commons-videos 4 года назад
will it work in react native or just for react ??
@fkaspow
@fkaspow Год назад
React Suspense for sure arouses me @Traversy Media :D
@alphaseinor
@alphaseinor 4 года назад
I take it you can still do a redux provider like .render() in index.js
@kirin9991
@kirin9991 4 года назад
Yes
@sam18b
@sam18b 4 года назад
You can also nest those two Suspense elements and it would only ever show 1 spinner at a time
@RomeoMihalcea
@RomeoMihalcea 4 года назад
By 12:00 I'm already just fine with using if/else. This looks like the type of stuff you understand while writing and then makes absolutely 0 sense when revisiting the code 1 month later. You need a "tutorial for the tutorial" of Suspense here.
@greenie62
@greenie62 4 года назад
LOL, I got the {wrap} from "./modules" as well...Damn IDE trying to outthink itself.
@princechaudhary3382
@princechaudhary3382 4 года назад
awesome
@andig97
@andig97 4 года назад
I like ur videos
@rudhimediastara
@rudhimediastara 4 года назад
Hey brad, are you interested making video/tutorial about web components in the future?
@hendriagustino1347
@hendriagustino1347 4 года назад
15:47 Hi, Just some tips for any React developers out there, should your compiler throw any warnings such as in this video. Instead of searching/ finding the keyword "wrap" in the whole document. U can look up at the filename, line number and column number in your terminal. In this video ( API.js Line 2;10 'wrap' is defined but never used.) This is what I do on daily basis where upon done doing any changes I will try to look up to the terminal to clean up any compilation warnings before pushing my commits to remote repository :)
@shinnthantminn9758
@shinnthantminn9758 2 года назад
that was avaliable in react 18?
@abhinavtumu2380
@abhinavtumu2380 4 года назад
Why didn't you use async/await instead of .then?
@williammandang
@williammandang 2 года назад
I used this exact same method but my state keep getting getting resetted to the initial null value every time. I can't pass my state as props to another component because of that. Anybody know what happened?
@ridl27
@ridl27 4 года назад
thank you Brad! and can u share the code with us ? =)
@basiccoder2166
@basiccoder2166 2 года назад
9:53 wrapper that arouse 🤣🤣🤣🤣
@artiomoganesyan8952
@artiomoganesyan8952 4 года назад
Is there any reason to use this in today's development?
@o_magro
@o_magro 3 года назад
love you
@bradsmith6340
@bradsmith6340 4 года назад
Great video. But omg the writers of react seem to be paid per line of code. Why is this any better than setting result equal to a spinner until data is fetched?
@volodymyrberestovskyy4935
@volodymyrberestovskyy4935 4 года назад
Just another positive comment)))
@gosnooky
@gosnooky 4 года назад
Seems like a lot of boilerplate to avoid an if statement. Not for me.
@alphaseinor
@alphaseinor 4 года назад
the purpose from what I can see is to remove conditional logic out of the component render.
@avi7278
@avi7278 4 года назад
No shit... this is the definition of over engineering.
@avi7278
@avi7278 4 года назад
@@alphaseinor I'm nearly certain that I could remove that condition without an extra 100 lines of boilerplate.
@abeprangishvili
@abeprangishvili 4 года назад
more react videos !!!!
@TraversyMedia
@TraversyMedia 4 года назад
I know, I need to, it's just so many of my viewers use so many different frameworks, I like to create videos that everyone can relate to. But I will try and do more React
@Arillaxe
@Arillaxe 4 года назад
So this is basically try/catch for components? If Suspenses child throws an error it will just render the fallback stuff
@aldocaamal7740
@aldocaamal7740 4 года назад
pretty much it
@thomasp3218
@thomasp3218 2 года назад
Yes but it's declarative not imperative
@praneshp
@praneshp 4 года назад
please update your course in udemy (reactjs)
@manjeetverma9188
@manjeetverma9188 4 года назад
1st view.. :)
@omsomol.j2501
@omsomol.j2501 Год назад
Thanks.But users api didnt work ))no problem in code but doesnt work
@griffadev
@griffadev 4 года назад
I was all in, until the wrap promise method and checked out, seems way too complicated
@abeprangishvili
@abeprangishvili 4 года назад
please multilanguage react :X
@motivationalstory17
@motivationalstory17 4 года назад
Fast 3g .. That will be still slow 😅
@Booyamakashi
@Booyamakashi 4 года назад
Damn react is full of boilerplate from hell and apparently they dont even think about changing that fact.
@xgerbil3586
@xgerbil3586 4 года назад
Comment
@pharmokan
@pharmokan 4 года назад
import React, {Suspense} from 'react'.......... wait wut, you could do that?
@WeirdSide
@WeirdSide 4 года назад
I don't understand what the advantage is to doing this rather than just checking if your data is null first
@avi7278
@avi7278 4 года назад
I dont get it. Is this really a pain point? You didn't have to check if user === null ... you simply replaced it with 100 other lines of unreadable code and for what benefit? So you can defer rendering a component until it has data? It just seems like putting in two regular pennies to get a shiny one back. Is your shiny penny worth it? Probably only to applications on the scale of Facebook.
@harishkumarforever515
@harishkumarforever515 2 года назад
your video title is about react suspense, you should just explain about it in short and simple way but you made it so much complex things and explained unnecessary things in these video, these video is not upto the point , waste video
Далее
React Native Crash Course
51:28
Просмотров 689 тыс.
Olive can see you 😱
01:00
Просмотров 6 млн
Axios Crash Course | HTTP Library
42:20
Просмотров 363 тыс.
Update Host file to map Hostname and IP Address
3:23
Просмотров 1,9 тыс.
React Tutorial for Beginners
1:20:04
Просмотров 2,7 млн
A Quick Intro to Suspense in React 18
8:25
Просмотров 26 тыс.
Express Crash Course (2024 Revamp)
1:46:11
Просмотров 48 тыс.
Removing State and Effects with Suspense!
11:57
Просмотров 15 тыс.
Кто производит iPhone?
0:59
Просмотров 215 тыс.