@@davidchavarriamendez9091 The correct method is up to your case and your boss's case. Can't really choose a "correct" methods when you can do it any way and it works. Now the correct way in my opinion is functionless/serverless architect. Anywhere where microservices can come in and pick up the slack. I absolutely hate when there's a module that either does everything or doesn't do anything at all. Also monoliths are a big no no.
Actually it's easy possible to use named exports instead of default exports. Import function is simply an promise. lazy(()=> import('component/login').then(comp => comp.login)) So no need to change the way you export functions.
Hey Thanks Man!!! Currently I am working on a project where performance is crucial. I am glad I came across this video and applied it on my project. Really helpful content, Have a great day.
Hope you stay healthy as always and keep making these micro-learning videos, it literally helps us to cultivate out mindset of "An Expert is a Beginner who stays actively curious and never quits". I like the way you do like, instead of making one long hours big project tutorial, you instead guide us to the basic concepts based on most demanded frontend trends like Performance Optimization and React Hook Form the simplified way. Bravo!!
Ohh, Pedro thanks for sharing this with us thank you so much I love that features, please we need a playlist from things like this, thank you again!!!!!
i opened a tab in my browser one year ago....on this topic....obviously i lose it among all the hundreds opened tabs 😂. i finally completed my react education...10x
Hey man, I watched this video earlier and loved the concept of lazy loading. I am currently implementing it into my current project and am here to ask if lazy loading caches loaded components. Thanks, man.
many thanks for your sharing. I have applied react lazy in my project. Howerver, there are so many named export components in project (~ 40-50 files), so I can not go into each Component to change export to export default. Fortunately, I found a package lazily on npm, it works the same as React lazy but will convert named export to default export.
great video!, is there a way to start loading in the background a lazy component after our normal component renders but before we actually requires the lazy ones?.
in your example you wrapped the entire Routes with the Suspense... what if like you said you want to only lazy load SOME of those routes... now with the entire Routes block is in the Suspense would that force everything to Lazy load?
The only routes that will lazy load are the ones that you import using the Lazy method. Although they are inside of the suspense, it will only lazy load if you import with the lazy function
@@PedroTechnologies só vim perceber que era br quando vi os comentários, ótima dicção e ótimo conteúdo, me lembrou bastante a forma como o conteúdo é gerenciado (talvez por debaixo dos panos não tenha nada a ver) pelas páginas agora no Nextjs 13.
I'd be great a React crud implementation with Redux and hooks, it's without classes, using containers, slices as well for explain as other ways or cases to use, idk, a tutorial of it without pain ❤
How do you deal with paths that you request form the server and you display the path component in a react bundle? NOT ON A DEV SERVER!! YOU BUILD THE PROJECT AND SERVE IT USING EXPRESS OR WHATEVER. How do you manage that?
You don't have to export default for dynamic import() to work. You can instead do import('./CreatePort').then(module => module.CreatePost)
you actually have to return object with default
import('./CreatePort').then(module => ({default: module.CreatePost})) - like this
@@IdandushHen you don't have to import/export anything, just have 1 file with 1 line of code and boom!
@@KevinArellano So what's the correct method?
@@davidchavarriamendez9091 The correct method is up to your case and your boss's case. Can't really choose a "correct" methods when you can do it any way and it works. Now the correct way in my opinion is functionless/serverless architect. Anywhere where microservices can come in and pick up the slack. I absolutely hate when there's a module that either does everything or doesn't do anything at all. Also monoliths are a big no no.
@@jameswatadza8962 I don't even know why these people see videos that seem to be so below their level. They just come here to show themselves
Actually it's easy possible to use named exports instead of default exports.
Import function is simply an promise.
lazy(()=> import('component/login').then(comp => comp.login))
So no need to change the way you export functions.
how i leaned so much in a 10 minutes video is out of this world. Thanks Pedro, you're awesome
Hey Thanks Man!!! Currently I am working on a project where performance is crucial. I am glad I came across this video and applied it on my project. Really helpful content, Have a great day.
What is the result like?! I'm so curious, how much performance increase do you see?
I'm really new to optimising and making it more faster.
This is definitely increase your website performance.
I used next/dynamic to import components.
Hope you stay healthy as always and keep making these micro-learning videos, it literally helps us to cultivate out mindset of "An Expert is a Beginner who stays actively curious and never quits".
I like the way you do like, instead of making one long hours big project tutorial, you instead guide us to the basic concepts based on most demanded frontend trends like Performance Optimization and React Hook Form the simplified way. Bravo!!
Absolutely love these small 10 minute videos. To the point, and learned a whole lot. Thanks
I didn't know about this concept, thanks for this! also your editing has gotten super clean!
Happy u liked it! Im re-investing into quality :)
I have a mediun sized frontend project and this really helps. Thank you
this is just point to point explanation. Loved it
Great performance optimizations, hope you do this kind of videos more.
Simple and straightforward explanation! excellent work👏
I think I've learned from you in a couple of hours more than all these pointless Udemy 40+ hour courses
Gracias Pedro! nuevo skill desbloqueado!
Pedro, seu ingles esta bem fluente! E o seu conteudo e bem apresentado! Parabens!
Very well explained in a practical manner
New react course was damn good 😊😊
Simply & straightforward! Love the explanation!
Ohh, Pedro thanks for sharing this with us thank you so much I love that features, please we need a playlist from things like this, thank you again!!!!!
Great vid! I recognized the Brazilian accent as the it started playing 😆
Keep up the good work!
Yo Pedro amazing video as usual. Good to see your still helping us learn to code while your a software engineer at Twitch!
Great information, thank you for posting this video.
What is the end value of performance you won? Have you calculated it? Or it's just fine thoughts that you read somewhere?
Dude your content is amazing, the way that u explain things is really interesting.
Good information on optimisation of a react app.
I have always wondered how to implement this🤩. Always learning new things from you.
Nice video, would have been good if you had the code linked in the description also though
você é incrível! Merece todo o sucesso do mundo!
Thank you so much for this video☺You explained it so well
i opened a tab in my browser one year ago....on this topic....obviously i lose it among all the hundreds opened tabs 😂. i finally completed my react education...10x
Hi Pedro..thanks for the invaluable resource. Please can you do a video on design patterns with examples. Thanks
6:35 Actually React Suspense has been used with the same regularity throughout all versions of it's for as long as the hook exists, but it's ok :)
Love this video man :-) well done with the simple explanation
Hey man, I watched this video earlier and loved the concept of lazy loading.
I am currently implementing it into my current project and am here to ask if lazy loading caches loaded components.
Thanks, man.
Please make a playlist -> how to improve
As always brother didn't let us down!
Jeez the quality ✔✔, What mic do you use?
Thank you
Please make more videos on how to improve the performance of react application
Thank you from the bottom of my heart!
nice man, finally i got it. Thanks.
many thanks for your sharing. I have applied react lazy in my project. Howerver, there are so many named export components in project (~ 40-50 files), so I can not go into each Component to change export to export default. Fortunately, I found a package lazily on npm, it works the same as React lazy but will convert named export to default export.
That was amazing, thanks a bunch!!
Thank you so much pedro
thanks for the vid. I was wondering what theme do you use?
Thanks
Great content bro, thank you !
Top notch as usual
Muito daora mano, manda muito na programação e no ingles tb!!1 brabo
Amazing explanation thanks man
what theme are you using Pedro nice color combination
Thanks! Great Job!
It's very useful, thank you so much
Pedro, do you have a tutorial on how to auth with Google and then register with an express API app? Thanks.
Thanks Pedro
great video!, is there a way to start loading in the background a lazy component after our normal component renders but before we actually requires the lazy ones?.
This is super helpful!
Excellent Video. Pedro, where are you from?
Great Video bro... helps a lot.
Nice explanation
Can you also make a video on , how to improve performance in Nextjs..please
Great vid bro. Thanks
in your example you wrapped the entire Routes with the Suspense... what if like you said you want to only lazy load SOME of those routes... now with the entire Routes block is in the Suspense would that force everything to Lazy load?
The only routes that will lazy load are the ones that you import using the Lazy method. Although they are inside of the suspense, it will only lazy load if you import with the lazy function
@@PedroTechnologies !!! Nice makes sense thanks for the reply!
@Ajkl Ajkl watch his video from the start and try to understand the the explanation of the purpose of lazy loading. He explained the purpose properly.
Hi Pedro, thank you for sharing tips. I just want to clarify if this can be achieved as well with ? Which is rendering exact route
awesome video !!
Obrigado!!
Watching Pedro's videos never disappoints. Keep it up 👍🏼👍🏼
Thank you bro!
Brabo! Adoro esse canal
Ótimo video! Poderia fazer um vídeo falando sobre o novo use hook e como isso impactará no React query?
Vou fazer!
@@PedroTechnologies só vim perceber que era br quando vi os comentários, ótima dicção e ótimo conteúdo, me lembrou bastante a forma como o conteúdo é gerenciado (talvez por debaixo dos panos não tenha nada a ver) pelas páginas agora no Nextjs 13.
You can also code split packages using react loadable.
I'd be great a React crud implementation with Redux and hooks, it's without classes, using containers, slices as well for explain as other ways or cases to use, idk, a tutorial of it without pain ❤
Peidro tech sensei. Saludos desde Perú.
Great content, congrats
Ótimo conteúdo, obrigado!
Thanks Man ❤❤❤❤
This video explains really well why you should choose angular over react.. 😂😂😂
Parabéns mano, muito bom o vídeo 👏
Thank you
Which theme you are using in this video
This is amazing 🥰
Just don't forget to add error handling in case on poor network lazy loading fails.
Good video! Thank tou
amazing video!!!
Good point
Great content 👌
Glad you liked it
Mano seu Inglês está brabo congratz.
Nice thank you for that this is great
Thanks a lot!
Excelente vídeo! Valeu!
Amazing .
Does this affect the app when deploying it?
awesome!
Thanks alot
Is suspense really recommended in a actual large scale application ? It's still experimental...
THNX BRO
How do you deal with paths that you request form the server and you display the path component in a react bundle? NOT ON A DEV SERVER!! YOU BUILD THE PROJECT AND SERVE IT USING EXPRESS OR WHATEVER. How do you manage that?
Is suspense a ready to use and stable functionnality with react ? Because it has been introduced an experimental one for years now
Hi Bro good explanation
Very usefull man... thanks for share!
Thanks
can you lazy load components from an index file?
Awesome video