Ibrahim Abdulbasit
Ibrahim Abdulbasit

Reputation: 21

server side rendering and single page applications

When we use client side rendering, I know this will reduce the amount of connection time with the server, for example if we use react for that (using create-react-app) , react will create one js file contains all of our application stuff except the data we will receive from the api (which will most often be in json) - but that means all the DOM stuff will be in that one js file that the user will get when he load the page for the first time, now for small apps I don't see a problem. But in large applications, when we have a lot of pages, components and sub-pages using routing libraries like react-router, do all these things and code will be in that file? wouldn't that make it too big? to be send at once?

There is no doubt that these techniques increase the performance of the website and interactivity, but my concern is the first time the site is loaded and how to make it as fast as possible with Relatively large applications

Upvotes: 1

Views: 538

Answers (1)

Ibrahim Abdulbasit
Ibrahim Abdulbasit

Reputation: 21

Thank you all, the solution is to use "lazy loading" and "code splitting" techniques, This is a good article about this : Lazy loading routes in react

Upvotes: 1

Related Questions