3 ms·
The React site part of this is not real. The author ticked "Disable cache" which means the same code (which powers the interactive editable sandboxes they're sc
by danabramov 3y ago
The React site part of this is not real. The author ticked "Disable cache" which means the same code (which powers the interactive editable sandboxes they're scrolling by) gets counted over and over and over as if it was different code.
If you untick "Disable cache", it's loaded once and gets cached.
- fesc 3y agoYeah but once per page, which is why it is okay to disable cache as the author wanted to simulate a cold load of each of those pages.
- danabramov 3y agoThat's also not true? I'm navigating between pages, and it does get served from cache for all subsequent navigations. The only case when this code gets loaded is the literally the first cold load of the entire site — and it's only used for powering live editable interactive sandboxes (surely you'd expect a in-browser development environment to require some client-side code). It doesn't block the initial rendering of the page. What is the problem?
- balls187 3y agoI think the issue isn't with the methodology (disabling cache), but rather the erroneous conclusion that the React.dev website continually requests data as somehow problematic when it's a sideeffect of disabling browser cache. Also, FWIW, OP is one of the authors of react.dev and a member of the react core team (not that it's relevant to the objection).