Live data from Hacker News

Inferno: A fast, React-like JavaScript library for building UIs

github.com

61–70 of 128 posts

Re: Inferno: A fast, React-like JavaScript library for building UIs

#61
post #47

I'm trying hard to figure out why someone want to use something like this or React, when vanilla HTML, CSS and JavaScript seems much easier and more performant. The only thing I can think of is that appendChild is a bit tedious, but createClass seems even more boilerplate.

> I'm trying hard to figure out why someone want to use something like this or React

There are many reason why one would want to use framework X,Y,Z instead of writing his own (because at the end of the day, any large application will need some form of framework/toolkit to be maintainable).

The first reason I guess is that in practice the code you depend on is the code you don't have to maintain and test.

The second reason is politics. You work with 50 engineers. You decide to write your own toolkit. I'm pretty sure you'll end up having endless debates about what is the right architecture. Now if you tell the rest of your team or the management "Facebook/Google is using that, they can't be wrong", It can save a lot of time.

The third reason is "laziness". Many "engineers" using React or AngularJS actually don't know how the DOM really work, like many people only know jQuery and not standard DOM API in order to perform a task, or many "engineers" don't know how to write CSS so they use Bootstrap. Yet the same engineers are writing 1 million dollars SPA for Fortune 500 companies ...

Frameworks are a trade-off. By learning one, you expect the investment to save you time, maintenance cost and not to be leaky(i.e. not having to understand the internals of a framework in order to use it). In an era where engineers are asked to be backend engineers, front end engineers, DBA, UX/UI specialist,data analysts, statisticians, server administrators, to know the OSI model from top to bottom,to know 10 languages with 5 years of professional experience in each of them and what not, some engineers don't consider learning the fundamentals of the DOM a worthy investment.

Re: Inferno: A fast, React-like JavaScript library for building UIs

#62
post #47

I'm trying hard to figure out why someone want to use something like this or React, when vanilla HTML, CSS and JavaScript seems much easier and more performant. The only thing I can think of is that appendChild is a bit tedious, but createClass seems even more boilerplate.

Do you happen to have any benchmarks to back this up?

Re: Inferno: A fast, React-like JavaScript library for building UIs

#63
post #58
post #47

I'm trying hard to figure out why someone want to use something like this or React, when vanilla HTML, CSS and JavaScript seems much easier and more performant. The only thing I can think of is that appendChild is a bit tedious, but createClass seems even more boilerplate.

The vanilla way tends to result in state spread out throughout your JS and DOM. React UIs act like predictable functions: you describe the UI you want with your current state as the input and React makes the visible UI match that.

You also want to batch your DOM manipulations as much as possible, and you get it automatically by using vDOM libraries.

Re: Inferno: A fast, React-like JavaScript library for building UIs

#64
post #47

I'm trying hard to figure out why someone want to use something like this or React, when vanilla HTML, CSS and JavaScript seems much easier and more performant. The only thing I can think of is that appendChild is a bit tedious, but createClass seems even more boilerplate.

> I'm trying hard to figure out why someone want to use something like this or React There are many reason why one would want to use framework X,Y,Z instead of writing his own (because at the end of the day, any large application will need some form of framework/toolkit to be maintainable). The first reason I guess is that in practice the code you depend on is the code you don't have to maintain and test. The second…

> Many "engineers" using React or AngularJS actually don't know how the DOM really work, like many people only know jQuery and not standard DOM API in order to perform a task, or many "engineers" don't know how to write CSS so they use Bootstrap.

Many know how all these things work but prioritise your first reason "code you don't have to maintain and test".

Re: Inferno: A fast, React-like JavaScript library for building UIs

#65
post #59

Earlier quoted context omitted.

> It's solving performance issues that React and other virtual DOM libraries currently suffer. But isn't "performances" the point of React? As I understand things, people were moving from AngularJS to React because the virtual DOM was supposed to be the most performant technique to handle UI mutation and rendering. So what is the reality behind the supposed speed of React ?

Performance is not the point of React. Predictability is. Bunches of bugs are eliminated and others are easier to find.

> Bunches of bugs are eliminated and others are easier to find.

Got a link to the research for that?

My pet peeve is unsubstantiated bullshit claims. We let sooooo much nonsense fly, especially in JS land.

Re: Inferno: A fast, React-like JavaScript library for building UIs

#66
post #55

Quite honestly my problem with react is the gzipped size, not the performance. What's the size of the browser bundle of this library?

it's quite small (20k min). i think the two main deps needed are:

https://github.com/trueadm/inferno/blob/master/packages/infe...

https://github.com/trueadm/inferno/blob/master/packages/infe...

Re: Inferno: A fast, React-like JavaScript library for building UIs

#67
post #59

Earlier quoted context omitted.

Performance is not the point of React. Predictability is. Bunches of bugs are eliminated and others are easier to find.

> Bunches of bugs are eliminated and others are easier to find. Got a link to the research for that? My pet peeve is unsubstantiated bullshit claims. We let sooooo much nonsense fly, especially in JS land.

I will go write a blog post on medium claiming some research I did and link to it. The stuff I read on here makes me never want to come back to this website again.

Re: Inferno: A fast, React-like JavaScript library for building UIs

#70
post #69

At the risk of beating a dead horse, we are only fueling the flames of javascript fatigue by churning out these "It's like X, but with more/less cowbell" libraries. We need to stop fragmenting and start doubling down on existing libraries.

API compatible or near compatible drop in replacements are a good thing though. The way we can have new things without needing to rewrite everything.

The only issue with this one is the lack of context API, which is needed for a lot of third party integrations, like react-redux.

If it wasn't for that, it wouldn't be a problem at all.

Post reply on HN