3 ms·
We are actually working on this! Just because we did some small fixes doesn't mean we aren't working on something bigger :). The current app is a full isomorphi
by vlucas 5y ago
We are actually working on this! Just because we did some small fixes doesn't mean we aren't working on something bigger :). The current app is a full isomorphic SPA with React + Redux. It's a beast, and around 80% of the code is completely unnecessary on the client. Our initial approach was little tweaks and performance wins like this, but those are diminishing returns with a JS payload size so large.
Next week we are rolling our our new property detail page for Rent.com that is mostly server-rendered with a few interactive React components injected and hydrated on demand as you scroll. It brings the app bundle size down from about 1.5MB (yikes!) to around 140kb. It's been a huge, long effort and is a completely new app architecture. It of course increases our score way more than just 17 points :)
- jain_chirag04 5y agoCan you share what you guys used for hydrating on demand as you scroll?
- vlucas 5y agoWe custom wrote our own Babel plugin + some runtime functions that handle this. It changes the way we import our components and we have to choose async vs. server rendered component at import time, so that is the main trade-off. We will be sharing more about this approach along with an open source library soon. We have been working on it for the better part of a year.