React website slow to load - Is it due to many static assets?

Viewed 1509

I'm ML pro getting up to speed on frontend. So I added a bunch of fixed assets like images and stuff like that in the assets folder for React and I feel like my website is slow.

Do you think the fixed assets, the images I added is the reason for the slowness?

Thanks for the help!

1 Answers

Yes, all assets slow down your website loading time since they have to be downloaded in case they have not been cached in the first place.

You should look into code-splitting your app official React docs. that way you can load your JS code in chunks and only when needed. Second thing is that you should optimize your assets, your hero image takes up 1.7 MB which is really a lot for someone using a slow internet connection (3g). Also, someone already mentioned in the comments to look into the critical rendering path, no need to load a footer if your user is going to be looking at a pretty hero image. :)

Related