Hi, very good thks. For those who are using typescript, for async load component (@9:44) you can type the useState like this : const [MyDefaultComponent, setMyDefaultComponent] = useState();. Then to import the component (no need the WrapperClassFunction) . Juste create the onLoad function inside your App like this : const onLoadComponent = async (): Promise => { const theComponent = (await import("./MyDefaultComponent")).default; setMyDefaultComponent(() => theComponent); }; This prevent react from crashing with the wierd error 'expecting string, received object'
@Nomak1113 жыл бұрын
Amazing video, please continue covering topics like this. I feel like once channels get bigger they focus on content that is accessible to broader audiences and it's all just intro to this and that instead of advanced topics. Your's is one of the few channel's that produces quality content for people not on the beginner level. Bought your book to support, good stuff as well.
@jherr3 жыл бұрын
Thank you sooooo much!
@michaelharveymusic2 жыл бұрын
I second this, i love the deep dives you do!
@theworld59372 жыл бұрын
You are one of the best teachers of React. So much clearer than many others. Your font size is perfect and large enough and love the split screens. Don't think I can ever approach your level of mastery of React no matter how many years. Some people just think logically and some are more right brained. Thanks for your tutorials and I am a subscriber.
@sanzhar.danybayev3 жыл бұрын
Jack, thank you for what you're doing! You're such an incredible teacher! I can clearly see that huge experience and wisdom that you posses ( btw I've been software engineer for 7 years) . What a luck to have you!
@jherr3 жыл бұрын
Thanks! Lucky to have your feedback and viewership!
@alex-vukov2 жыл бұрын
Thank you very much for the always great tutorials! I didn't know about the loadable components library and it looks really useful! One small remark - at 06:15 renaming the Webpack chunk to a fixed string called 'utilities' is not optimal for cachebusting because if the utilities file changes the user will have to clear the browser cache to get the new change.
@RachidBoudjelida2 жыл бұрын
damn I have been doing react for little over 3 years now, but every video I learn something new
@pratamaa.s.43563 жыл бұрын
Thanks Jack! +1 subscriber as soon as I saw "advanced frontend" in your KZbin banner,. One small suggestion, if you could create a playlist named like "advanced frontend" or "junior to intermediate frontend", to cover these kind of topics that we must have to level up our frontend game.
@marcelsdev3 жыл бұрын
Thanks Jack. This really helped me understand and clarify a few things that I was struggling with. Seeing it in practice with your explanations really helps filling in the gaps.
@waqasrana57342 жыл бұрын
you the gem i really thought that i can not do any thing. my collegues are doing exciting things and i don't know how to learn them then what luck to have you thank you love you .
@jherr2 жыл бұрын
Awww thank you!!
@igotbit94542 жыл бұрын
Yes! loved this talk. not talked about much out there. thx!!!!!!!
@mani85863 жыл бұрын
Again TOP Content from Jack...like the way you explain the content so easily
@gamingmobility87342 жыл бұрын
I was trying to find a way to use Nextjs to have both a website, and a dashboard for the sites admins. I couldn't find a way to keep it separate anywhere. After going to the admin route forcing login and authentication then using this loadable component did the trick! Thank you!
@kalyan42552 жыл бұрын
Very Informative Video! Please keep doing more videos
@TavoZapata3 жыл бұрын
Great stuff! Love the way you explain these core concepts
@bythealphabet3 жыл бұрын
Great video Jack, loving the part of module Federations.
@walidklai24172 жыл бұрын
The best React channel, Period. Thank you Jack .
@jasonthorpe34703 жыл бұрын
If you want to store a React.FC in a useState, you don't need a fancy wrapper class -- just need to wrap it in an anonymous function, as in `const [myComponent, setMyComponent()] = useState( () => () => Loading); setMyComponent(() => () => My component has arrived) ` The reason this broke your first example in the "manually wrapping async loaded react components" section is that setState allows you to lazily set the state (i.e. in case the default value is expensive to calculate) so it lets you set the state (either initially or later with the provided setter) by giving it a function that will eventually return the state -- which it will only call once (e.g. so the initial state doesn't get calculated durning every render cycle). Plus `setState( () => MyComponent)` is much easier to remember than `setState(myFancyComponentWrapperForFunctionalComponenttMangedWithUseState(MyComponent))`
@jherr3 жыл бұрын
Oh, yeah, you're right. Facepalm. Ah well. Still better to use loadable.
@mkman3 жыл бұрын
That IS a gorgeous header! No wonder the product team wanted a piece of that action 😄
@jherr3 жыл бұрын
Hahaha, absolutely!
@rohan_webdev2 жыл бұрын
This is beyond any orther React video on KZbin. Full indepth I just love it ❤️💯🫡🫡. Thanks Jack 👍🙌😀
@appuser2 жыл бұрын
Very interesting. I wonder how/if this has changed much since January. Thanks Jack, this helped me a lot!
@guilhermegirardi3 жыл бұрын
Awesome video! Regards from Brasil!
@shike7692 жыл бұрын
I have nothing to say than Amazing, blow my mind away 🤯
@Mark_MKII2 жыл бұрын
I’ve been doing front-end dev for a quite a while, and finally have the opportunity to more forward-thinking work. Some of your explanations really clear up ambiguous concepts that are rarely expressed clearly. (A friendly note about the intellisense tooltips that seem a little overly aggressive in showing their lovely help text - they often obscure the code you’re trying to show, and in really bad cases instill a feeling of inexplicable anxiety)
@jherr2 жыл бұрын
Yeah, I've started turning them off for screencasts. Sorry about that.
@ranganathdevaramani29663 жыл бұрын
Great content as usual. Please make a video on next js bundle analyzer and how to reduce the bundle size
@electronicbasics18563 жыл бұрын
i think that i will let my future self make the tests/comments/code splitting for me :)
@angelprieto20013 жыл бұрын
Thank you very much Sir, as always an amazing job!
@RakeshKumar-bq3mf3 жыл бұрын
Awesome content. Appreciate great efforts.. Thanks Jack...🙂
@shubhamlatiyan79723 жыл бұрын
Thank you Jack, for the awesome information
@ahmedChebilahmed19chebil3 жыл бұрын
nice content as usual ❤️. Thank you for the nice information
@balzale3 жыл бұрын
Awesome vid, Jack!! Love your custom bash/zsh. Can you please share how to customize like that? THANKS!!
@jherr3 жыл бұрын
iTerm2 with zsh/oh-my-zsh with oh-my-posh with powerlevel10k_rainbow and SpaceMono NF
@SIRISH19903 жыл бұрын
Jack, thanks for all the stuff you do. can you also do a tutorial for securing electron app with keycloack.
@BarryMichaelDoyle2 жыл бұрын
I've seriously learnt a lot from this! Is there a TS example of the `loadComponent` function that you've created?
@jherr2 жыл бұрын
You'd have to declare the external module in your app.
@BarryMichaelDoyle2 жыл бұрын
@@jherr figured that'd be the case, thanks man!
@jherr2 жыл бұрын
@@BarryMichaelDoyle It's one of the disadvantages of runtime deps as opposed to build time deps.
@umairasad38965 ай бұрын
I am really impressed by your theme. What theme are you using?
@geneartista97142 жыл бұрын
Awesome as always but I wanna know it`s best use case on a project
@ashish_prajapati_tr3 жыл бұрын
an amazing and very important topic 👍👍
@rishabhjain51352 жыл бұрын
hi , nice tutorial. have a question - when to use this dynamic loading of components. Is there is any specific criteria for this or we can use whenever we want??
@jherr2 жыл бұрын
I can't think of any technical criteria that says that you can't use it when you want.
@rishabhjain51352 жыл бұрын
@@jherr ok , so what's the difference between importing components normally vs importing asyncronously ?
@大盗江南2 жыл бұрын
Hi Jack, thx so much for this great video. but i have a little suggest :) The title doesn't correspond to the content. and this is for advanced level. i thought this is a tuto for splitting complex code. plz correct me if im wrong. thx again for all those wonderful videos.
@nakulnagariya77363 жыл бұрын
Amazing, thanks Jack
@SahilRajput032 жыл бұрын
such an amazing video!!
@danishansari5746 Жыл бұрын
There is an issue with React Lazy loading is that when ever we deploy the code the chunk file names are getting changed because of that the user gets the blank page. User will have to refresh the page or our may be have some code that will automatically refresh that page Hey Jack for React Lazy loading is there way to keep chunk names same and not to write extra code for auto reloading when ever the code is deployed and user is able to use latest code
@haicoders7372 жыл бұрын
very nice video, btw , what kind of font and theme do you use in vscode
@jherr2 жыл бұрын
Night Wolf [black] and Operator Mono.
@MrEffg3 жыл бұрын
Thank you, Jack! Top content in calm manner as always! I wonder how could one leverage module federation in monorepo app or are there best practices on how to share code in monorepo app between packages (without bit . dev)
@MediumSizeNoob2 жыл бұрын
Great one Sir! Can you share the theme and font you are using?
@jherr2 жыл бұрын
Night Wolf [black] and Operator Mono
@vengateshvaidyanathang550 Жыл бұрын
Good video.. Can you tell us the vscode plug-ins you are using as a pro dev
@PickleRiiiiiiick2 жыл бұрын
Fantastic. I'm curious how this will work with Vite.
@Ahmed-cy4jp3 жыл бұрын
What’s your VSCODE theme?
@jherr3 жыл бұрын
Night Wolf [dark] and Operator Mono.
@kalyanapasupathyvenkataraju3 жыл бұрын
Absolutely wonderful
@oussamasadiki7377 Жыл бұрын
how about Vite?
@rathileshc3 жыл бұрын
Really great tutorial , and could you please tell which theme are you using in VS CODE ? it looks like very nice ..
@jherr3 жыл бұрын
Night Wolf [black] and Operator Mono for the font.
@jr-hp7er3 жыл бұрын
You're awesome Jack 😘
@kettenbach3 жыл бұрын
Awesome content as usual Jack. Can I ask how you got that amazing prompt in your terminal. I would love to use that! Thanks and have a great week.
@jherr3 жыл бұрын
That's oh-my-posh + the powerlevel10k_rainbow theme + SpaceMono NF for the font.
@kettenbach3 жыл бұрын
@@jherr so for Mac? You're using PowerShell?
@jherr3 жыл бұрын
@@kettenbach On Mac I use zsh (oh-my-zsh) in iTerm2.
@maximgasai13493 жыл бұрын
@@kettenbach nah, oh-my-posh works with macOS and Linux shells as well
@DarkShadow00972 Жыл бұрын
Hi jack u automatically getting lot of intellisense which extension r u using?
@jherr Жыл бұрын
GitHub Copilot.
@DarkShadow00972 Жыл бұрын
@@jherr thanx 👍
@aminedaimallah3103 жыл бұрын
nice tutorial, i just have a question, is this what it's called Serverless Components? i mean the last part of the video
@jherr3 жыл бұрын
Not that I know of. Serverless Components is interesting stuff though. I hadn't heard of it before.
@aminedaimallah3103 жыл бұрын
@@jherr oh my bad it called React Server Components, i made a mistake haha
@jherr3 жыл бұрын
@@aminedaimallah310 No worries.
@jherr3 жыл бұрын
@@aminedaimallah310 React Server Components is actually something different. It's an optimization around server side rendering.
@aminedaimallah3103 жыл бұрын
@@jherr oh i see, thanks for explaining, btw i like the place where you film the tutorials, is it a forest?
@fadi78193 жыл бұрын
What is this font he is using in vs code ?
@jherr3 жыл бұрын
Operator Mono
@rjmunt3 жыл бұрын
I might need to rewatch but why rewired in one app and craco in the other?
@jherr3 жыл бұрын
Because some folks use craco, other folks use react-app-rewired, and this video covers both. :)
@rjmunt3 жыл бұрын
@@jherr Ahhh great thanks for covering all the bases sir. Great to see MF easily accessible in CRA at last.
@christopheanfry2 жыл бұрын
Very Interesting video a lot of things to learn. I’m late with the comments but now that we see a lot of use of vite, is module federation still up to date and do you recommend it? I hear also about monorepo with nextjs is it working the same way? Thanks for your help and happy new year
@jherr2 жыл бұрын
There is a module federation plugin for vite but it is pretty early days yet. The monorepo + nextjs is great, but it only accomplishes build time sharing and not runtime sharing. That being said, most of the time build time sharing is fine. But when you need runtime sharing, Module Federation is a great option.
@christopheanfry2 жыл бұрын
@@jherr thank you so much for your reply really appreciate. Will check the plug-in for vite.
@andersonluissilva84143 жыл бұрын
You are amazing!
@yathink24063 жыл бұрын
Can we reduce node modules for each directorory into one
@igor_cojocaru3 жыл бұрын
Cool! Thank you
@Antoshkiv1 Жыл бұрын
Great video!
@khanhnam993 жыл бұрын
extension ? path show apple on visual studio code ?
@devmohamedkh3 жыл бұрын
+١
@jherr3 жыл бұрын
It's in the description, but it's oh-my-posh with the powerlevel10k theme, with SpaceMono NF as the font. I also use iTerm 2 and oh-my-zsh. And I use iTerm as the terminal within VS Code.
@devmohamedkh3 жыл бұрын
@@jherr Can you tell me the name of the extension that completes the codes, please Like the one who completed the path shown in 10:30
@jherr3 жыл бұрын
@@devmohamedkh Well, that particular import is Path Intellisense marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense But you probably want GitHub Copilot, which is doing a lot of the more TypeScript code-ey still hinting.
@devmohamedkh3 жыл бұрын
@@jherr thank you so much ❤
@maksymdudyk17183 жыл бұрын
Thank you very much. Yet, it seems to me that your "setNames(makeUppeCase(module.default))... is not a common solution.
@jherr3 жыл бұрын
Yeah, I don't think I would allow that particular variant. But the point here was just to show how to use default vs named exports.
@kirillpavlovskii83422 жыл бұрын
Great , thanks
@abhisheksharma97963 жыл бұрын
How much for the cabin in the woods?
@jherr3 жыл бұрын
I think it's currently valued at $700K USD.
@ashish_prajapati_tr3 жыл бұрын
@@jherr it's so costly
@anasouardini2 жыл бұрын
do I need to do this when using Vite?
@jherr2 жыл бұрын
Not really, because Vite serves every module independently. But Vite isn't used for production. So you will want to make sure whatever production system you are using supports it.
@shinmessiah3 жыл бұрын
I watched this video over 3 times or so. The content is really good and particularly useful for a project at work using external data stores. Super clear and useful! Actually, already using craco for some webpack => electron stuff, should be easy to drop in Also, I had to research what was going on with your terminal, with those nifty tags and such lol
@jherr3 жыл бұрын
If craco Module Federation works in Electron let me know. I'll probably give it a try, but not soon. So if you give it a go and get it going let me know.
@jvzaniolo3 жыл бұрын
Can you make a video about Remix?
@techhguy3 жыл бұрын
Hey Joao, Here's the link to Jack's take on Remix => kzbin.info/www/bejne/qJi9nJdjh6aMnKc
@ytPEDROjoao11 ай бұрын
🤯
@waqasrana57342 жыл бұрын
thanks
@vulcs2 жыл бұрын
The problem are bundles, ESM solves this
@shreyasshahu14233 ай бұрын
Respect++
@ahmedrapira76102 жыл бұрын
thnx
@DuyTran-ss4lu2 жыл бұрын
great
@jaybhatt67752 жыл бұрын
God
@hasi90s Жыл бұрын
Who the hell will add button for users to click that button and load the stuff , sorry to say but the start of your video is ridiculous and misleading you should be straightforward in teaching something and anyone searching for code splitting is not a starter of react he/she is searching for code splitting because he/she has developed app now optimizing it mind it