Hacker News new | ask | show | jobs
by _uhtu 3483 days ago
"but presumably they've stripped out many of the things that make React enjoyable to use in order to satisfy some arbitrary file size metric"

Why make this claim without looking yourself? You could validate that "presumably" by just looking at the docs, but instead you get sassy about it.

If you look at the docs, you'll see that the API is almost exactly the same. You really don't lose any features from switching to Inferno from React, what you lose is the React community.

I say this as an avid React user. Don't discredit something until after you've dove into it a bit.

1 comments

What do you think the extra 38kb of code is for? My point of view is, you've got a company with thousands of employees who work with a library every day and core teams dedicated to its improvement. Their requirements for speed and bandwidth far exceed our own as they reach further into the nth percentile of users, so you know things like speed and bloat are important for them to cut out.

What, if anything, is actually gained from a business perspective by reducing a single library by 38kb? My guess is exactly nothing. And the benefit of sticking to React is not only the community, but the fact that they actually own their virtual DOM implementation and actively work to improve it (the forthcoming fiber rendering engine is a great example of that.)

I'm not hating on new technology, but this isn't actually new. It's a clone that isn't really bringing anything new to the table, and just muddies the water for developers. It's like if every few weeks there was a new take on Git that did practically the same thing but wasn't Git.

We'd be much better off if these people were contributing to React core. Because if it truly has the same capability as React, you should be able to shave the 38k off right?

There's far more to Inferno than just file size. The internal implementation is completely different. Furthermore, React Fiber and Inferno are very different in terms of internal approach.
Thanks for your reply Dominic. As an end user, what should compel me to use Inferno for any production purposes? Bearing in mind React has the support of multiple billion dollar companies, several targets (web, native mobile/desktop, console) and a community of what is sure to be tens if not hundreds of thousands of developers. I just don't see the benefit of incremental improvements when they're not being integrated into that community. You lose all the benefit. I have no doubt Inferno is faster, but I suspect you're being disingenuous when you say all the same features are available.

The trouble I have is not specific to Inferno, but rather the idea that less and new is better. Eventually, your users will want something that Inferno doesn't offer, and eventually it will be implemented. And this will happen more than once, probably to the point where your library, too, is 45kb. So is all this work and fragmentation and confusion and comparing of benchmarks really worth it? I think not, unless the technology stands to bring something vastly different to the table.

The trouble with competing with React in its own space right now, stems from the vast amount of resources many of companies are putting behind it. You just can't make a Inferno Native, etc. I think we'd be much better off all working together on new ideas, not rehashing innovation in order to win benchmark tests.

All that said, I applaud the effort, as I'm sure this took a lot.

You don't need to necessarily use Inferno in production all at all. If you're happy with React, stick with it. Inferno can serve to help other authors and the React team to further improve their tools. This is open source after all, we can all learn and improve from one another and make even better software.
Personally, I was actually looking for an alternative to react some time ago, on the grounds of that "BSD License" + "Patents" that facebook has got on it. From what I know no, nothing has happened yet, but for peace of mind, having an alternative would help.

FYI, What I found was preactjs which is a 3kb with most new es6 features of react which I've started using in my project. Unfortunately, I haven't found an alternative to react-native yet.