Live data from Hacker News

React v0.14

facebook.github.io

71–80 of 116 posts

Re: React v0.14

#71

Earlier quoted context omitted.

React does not do dirty checking.

Well, it kind of does when comparing virtual DOMs before and after changes.

Usually people say “dirty checking” when they mean “keep checking in some kind of event loop whether external entity modified some object, and if so, do something”.

In React there's no such event loop where it checks virtual DOM—React knows if it needs to compare virtual DOM trees (not arbitrarily check models for changes, for example) because all changes are explicit and happen either due to `setState()`, `forceUpdate()` or `React.render()` top-level call.

So React doesn't do dirty checking in the sense Angular does, unless by dirty checking you mean all kinds of comparisons.

Re: React v0.14

#72
post #42

Earlier quoted context omitted.

> Only after a 1.0 release. 0.x implies that breaking changes are always possible Yes, which is why so many projects never reach 1.0. There are basically 2 types: 1. Those who don't want to have to care about compatibility at all. 2. Those who care about compatibility a little bit but don't want a large version number. React seems to fall into #2 here. They want a small version number and the perception of stability.…

>2. Those who care about compatibility a little bit but don't want a large version number. >React seems to fall into #2 here. Seriously, a library that goes out of its way to provide useful deprecation warnings and always keeping deprecated behavior for a version, with versions coming out once in three months, and released with codemods automating the transition for you , cares a little about compatibility? React tea…

> cares a little about compatibility?

Yes, they care. But they care more about their ability to make breaking changes without the stench of a major version bump.

You have to ask, why is it currently not 1.0? The roadmap you linked doesn't mention it. There's a reason. So what is it?

By the way, I know you're a huge React cheerleader and that's fine, and you think I'm being critical of React here and you need to defend this. But I'm not, this is a problem throughout the JavaScript community and really the fault lies there, not with any one particular project which is doing something a lot of others are also doing.

Re: React v0.14

#73

Earlier quoted context omitted.

Well, it kind of does when comparing virtual DOMs before and after changes.

Usually people say “dirty checking” when they mean “keep checking in some kind of event loop whether external entity modified some object, and if so, do something”. In React there's no such event loop where it checks virtual DOM—React knows if it needs to compare virtual DOM trees (not arbitrarily check models for changes, for example) because all changes are explicit and happen either due to `setState()`, `forceUpda…

Right. I guess it really depends how people define "dirty checking". What I was trying to say is that at the end of the day you do diffing on some data structure: model in Angular and virtual Dom in React.

Loop vs. one pass is an important distinction, agreed. But when we bring Angular we should be noted that Angular 2 doesn't do those checks in a loop but does comparisons in one pass only.

Re: React v0.14

#74
post #17

Earlier quoted context omitted.

I came in here to comment on this. React sounds exciting from what I've read about it, but I didn't realize it was pre-1.0. To teams who are using it in production, did you talk about this? What are arguments for using it despite it not being 1.0?

>To teams who are using it in production, did you talk about this? What are arguments for using it despite it not being 1.0? That it's stabler than most 1.0+ libraries is a good argument. Facebook uses React at massive scale, so they're very careful with changes, go out of their way to keep deprecated behavior for at least a version (and a version takes a few months), provide codemods for changes that can be automate…

> That it's stabler than most 1.0+ libraries is a good argument.

What exactly do you mean by stability here? A 1.0 library (according to semver) is not allowed to break compatibility unless they bump to 2.0.

Pre 1.0 version 0.14 is equivalent to version 14 if it had been 1.0. That's 14 breaking change in about 2 years. Or 7 a year. That's a lot. That's not stable.

Re: React v0.14

#75
post #17

Earlier quoted context omitted.

I came in here to comment on this. React sounds exciting from what I've read about it, but I didn't realize it was pre-1.0. To teams who are using it in production, did you talk about this? What are arguments for using it despite it not being 1.0?

What's in a name? That which we call a rose by any other name would smell as sweet.

That which we call a rose by any other name would smell as sweet.

Perhaps it would, if that other name had been chosen from the start.

However, in this case, many projects will have existing code using the earlier conventions.

Moreover, there is a substantial volume of documentation and tutorial blog posts and conference videos and example code repos using those older conventions, all of which has just been invalidated. This isn't just a loss, it is all now actively harmful to new developers adopting React or those trying to update to a newer version, because it's actually misleading.

If a library you're thinking of using in production is as willing to break API compatibility as React is, even if the changes are mostly announced a little way in advance, you should think long and hard about the overheads and instability you're going to incur with a dependency on that library before you adopt it. Move fast and break stuff might work if you're Facebook and thus have both final control over the library in question and effectively unlimited resources to maintain your code base, but it doesn't work very well for the 99.999% of web development projects that don't have those resources available.

To be fair, the React project itself seems to be quite transparent about its development methods. It's not as if they're advertising the library as stable -- it's still clearly shown as a 0.x version, for example. However, a lot of people are jumping on the bandwagon anyway and just hoping for the best, and that's probably not a good idea.

From an API point of view, all of that is what's in a name.

Re: React v0.14

#76
post #74

Earlier quoted context omitted.

>To teams who are using it in production, did you talk about this? What are arguments for using it despite it not being 1.0? That it's stabler than most 1.0+ libraries is a good argument. Facebook uses React at massive scale, so they're very careful with changes, go out of their way to keep deprecated behavior for at least a version (and a version takes a few months), provide codemods for changes that can be automate…

> That it's stabler than most 1.0+ libraries is a good argument. What exactly do you mean by stability here? A 1.0 library (according to semver) is not allowed to break compatibility unless they bump to 2.0. Pre 1.0 version 0.14 is equivalent to version 14 if it had been 1.0. That's 14 breaking change in about 2 years. Or 7 a year. That's a lot. That's not stable.

(To be fair, the initial release was 0.3 and we skipped over 0.6 and 0.7. http://facebook.github.io/react/blog/2013/12/19/react-v0.8.0...)

Re: React v0.14

#77
post #60
post #49

Earlier quoted context omitted.

Why do you care about an imaginary number? FB (and many other large companies) heavily use this in production, and have to migrate their own apps. FB even goes farther and uses the master branch (well, synced every week or so). That's a far heavier endorsement than whatever side of a decimal a number falls on.

> Why do you care about an imaginary number? It's not imaginary, it represents stability. By not going 1.0 you are saying it is alpha software and should not be used. Not everyone has Facebook's budget or resources to upgrade every 2 months.

> Not everyone has Facebook's budget or resources to upgrade every 2 months.

Even if you're FB, dedicating the engineering time to upgrading/testing/deploying 15k+ components by making a breaking change would be madness.

Anecdotally, when the React team breaks something (rare) a lot of people internally start yelling, and it never makes it into the releases. FB makes for one-hell of an integration test environment.

Re: React v0.14

#78
post #72

Earlier quoted context omitted.

>2. Those who care about compatibility a little bit but don't want a large version number. >React seems to fall into #2 here. Seriously, a library that goes out of its way to provide useful deprecation warnings and always keeping deprecated behavior for a version, with versions coming out once in three months, and released with codemods automating the transition for you , cares a little about compatibility? React tea…

> cares a little about compatibility? Yes, they care. But they care more about their ability to make breaking changes without the stench of a major version bump. You have to ask, why is it currently not 1.0? The roadmap you linked doesn't mention it. There's a reason. So what is it? By the way, I know you're a huge React cheerleader and that's fine, and you think I'm being critical of React here and you need to defen…

> But they care more about their ability to make breaking changes without the stench of a major version bump.

Source?

Re: React v0.14

#79
post #42

Earlier quoted context omitted.

> Only after a 1.0 release. 0.x implies that breaking changes are always possible Yes, which is why so many projects never reach 1.0. There are basically 2 types: 1. Those who don't want to have to care about compatibility at all. 2. Those who care about compatibility a little bit but don't want a large version number. React seems to fall into #2 here. They want a small version number and the perception of stability.…

>2. Those who care about compatibility a little bit but don't want a large version number. >React seems to fall into #2 here. Seriously, a library that goes out of its way to provide useful deprecation warnings and always keeping deprecated behavior for a version, with versions coming out once in three months, and released with codemods automating the transition for you , cares a little about compatibility? React tea…

Seriously, a library that goes out of its way to provide useful deprecation warnings and always keeping deprecated behavior for a version, with versions coming out once in three months, and released with codemods automating the transition for you, cares a little about compatibility?

Yes, any library that breaks code written according to documented good practices less than six months earlier only cares a little about compatibility. Everything else you mentioned may be true, but it's also mostly irrelevant.

This isn't necessarily a criticism of the React team. As I mentioned in another post, it's not as if they're advertising more compatibility than this and then not living up to what they claimed. The problem is some people having unrealistic expectations and reading more into the high profile of React than they should.

But mere months between fundamental breaking changes in published interfaces isn't a good level of stability and longevity for most production projects, and for any of those projects that don't have realistic plans and resources available for maintaining the integration regularly, React isn't ready yet.

Post reply on HN