Live data from Hacker News

Preact, a fast 3k React alternative

developit.github.io

1–10 of 142 posts

Re: Preact, a fast 3k React alternative

#4
post #2

How big is React gzipped? How much are you saving with this library?

Looks like React 0.14.6 is about 38k gzipped:

curl --silent --output /dev/null -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.mi...

>> size_download=39542

Re: Preact, a fast 3k React alternative

#7
post #2

How big is React gzipped? How much are you saving with this library?

Perhaps even more important, does library size still matter once dead-code elimination is an option in Webpack2? See: https://twitter.com/dan_abramov/status/656970508005736448

Just take a look, how many libraries are written in ES6, clearly not much. So dead code Elimination only works if you have ES6 libs and that will take some time.

Re: Preact, a fast 3k React alternative

#8
Where do the savings come from? I can't imagine that React.createClass() is all that much code. I'm guessing a lot of space saving comes from not doing PropTypes (which I find immensely useful) and not having a synthetic event system (meaning you can't test with TestUtils.Simulate.click()). What else is missing I wonder?

Re: Preact, a fast 3k React alternative

#9
post #8

Where do the savings come from? I can't imagine that React.createClass() is all that much code. I'm guessing a lot of space saving comes from not doing PropTypes (which I find immensely useful) and not having a synthetic event system (meaning you can't test with TestUtils.Simulate.click()). What else is missing I wonder?

PropType checking is compiled out of the production version of React.
Post reply on HN