DEV Community

Discussion on: Stop Using React? But Why??

Collapse
 
msveshnikov profile image
Max Sveshnikov

I think I found some kind of “solution” for slow initial load of rich web app. Please have a look to helpzone.me (my little social geo chat app for helping each other). This is React PWA, so about ~4Mb of JS code need to be loaded for map become fully interactive. But if you split to chunks via React.lazy(), first chunk will be just ~1Mb and I just displaying some kind of “onboarding” popup which any new user have to see anyway to understand what is it. And these several seconds which you are reading onboarding (simple sweet alert btw) are perfectly enough to load all remaining code. And service worker will cache all JS for next load :)