6 ms·
any news on bundle size? and maybe Closure Compiler compatibility for dead code elimination?
by undershirt 9y ago
any news on bundle size? and maybe Closure Compiler compatibility for dead code elimination?
- spicyj 9y agoNo final numbers yet, but we recently switched to Rollup for our own builds which will be part of 16.0, and we'll do some more work on file size in the next few months. For DCE, we've started splitting some features like createClass out of the main package (https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html https://facebook.github.io/react/blog/2017/04/07/react-v15.5...) which will reduce the bundle size for anyone not using them, regardless of how they compile their JS.
- bostonvaulter2 9y agoI'm excited! React-dom is currently one of the heaviest libraries that I'm using.
- kuschku 9y agoWhat bundle size range can we expect? Many mobile users are on throttled connections, due to low data caps, and research has shown users stop loading a site usually after 1 second of loading time. That means with a throttled connection, less than 8KiB overall CSS, JS and HTML can be transmitted, and with a 1Mbps connection, 128KiB can be transmitted. How many minutes will users have to wait with React Fiber? And can it be improved in any way to get below a few seconds? Or will I have to continue to write vanilla JS to get responsive apps?
- vote-for-pedro 9y ago> What bundle size range can we expect? > > Many mobile users are on throttled connections, due to low data caps, and research has shown users stop loading a site usually after 1 second of loading time. I'd be surprised if most users could find the stop button and manage to tap it in 1 second, so I'm going to have to call BS on that research. > How many minutes will users have to wait with React Fiber? And can it be improved in any way to get below a few seconds? Or will I have to continue to write vanilla JS to get responsive apps? The current version of React[1] is ~21k (~8k gz) and ReactDOM[2] is ~126k (~39k gz) so either you're over-exaggerating, I'm hopeless at basic math or you're just misinformed. [1] https://unpkg.com/react@15.5.4/dist/react.min.js https://unpkg.com/react@15.5.4/dist/react.min.js [2] https://unpkg.com/react-dom@15/dist/react-dom.min.js https://unpkg.com/react-dom@15/dist/react-dom.min.js
- kuschku 9y agoAnswering @vote-for-pedro: Yes, currently, a working React installation takes around 6-10 seconds to load on dialup or throttled internet, without caching. Which is pretty good. But React Fiber is doing a lot more than legacy react, so it'd be interesting to know how much larger it will get - and if it would still be performant enough.