Great article!
These code-splitting techniques may be redundant for small apps, however, for the larger ones, they are life-savers. Imagine having a gigantic app with many routes, big pages, many external libraries integrated into them, etc. The user would have to wait for several seconds to see the one page they are currently in. Everything would be much worse if the user had a bad internet connection :D. The researchers came to the idea that the websites should keep the delay of first contentful paint below 1.8 seconds, and the user should be able to interact with the page after 50ms; after these seconds, the user gets a sense of discomfort, which may cause them to leave the page. All these code-splitting techniques help us avoid such situations.
By the way, React team announced that starting from React 18, there will be SSR support for React.lazy and Suspenseπ Moreover, in React 18, the team introduces HTML streaming and Selective Hydration! These two can be added to the list of optimization techniques.
Great article!
These code-splitting techniques may be redundant for small apps, however, for the larger ones, they are life-savers. Imagine having a gigantic app with many routes, big pages, many external libraries integrated into them, etc. The user would have to wait for several seconds to see the one page they are currently in. Everything would be much worse if the user had a bad internet connection :D. The researchers came to the idea that the websites should keep the delay of first contentful paint below 1.8 seconds, and the user should be able to interact with the page after 50ms; after these seconds, the user gets a sense of discomfort, which may cause them to leave the page. All these code-splitting techniques help us avoid such situations.
By the way, React team announced that starting from React 18, there will be SSR support for React.lazy and Suspenseπ Moreover, in React 18, the team introduces HTML streaming and Selective Hydration! These two can be added to the list of optimization techniques.
Thank you for the appreciation π keep supporting me π€