React Server Side Code Splitting Made.. Again

Anton Korzunov
Aug 1, 2018 · 12 min read
Back to the future

Single Page Application.

The main reason for code splitting – Amount of JavaScript.

Such much JavaScript. Oh wow 🐶

So SPA?

Idea behind SPA — making next, “the second” page view faster.

SOMETHING IS VERY WRONG HERE!

WE ARE GOING BACK TO THE FUTURE!

Vroom Vroom!

Server Side Rendering?

Code Splitting with SSR

Suddenly – its not as easy, as before. Why?

Complexity of SSR friendly Code Splitting

The page is ALREADY rendered.

React-prerendered-component

How it actually does this magic?

SSR Code Splitting Conclusion

But it actually not the all it does.

React double definition problem

ANYTHING, you made on server —is useless! Just trash it.

But this stuff is not related to Code Splitting!

The End

PS: If I did not convince you

Anton Korzunov

Written by

Born. Code. Die. [Refactor.] Repeat.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade