Netflix Likes React
techblog.netflix.com
techblog.netflix.com
Runtime performance, modularity, headless testing have been absolutely critical as we've thought about how to make a hyper-extendable email client on Atom Shell. Having a consistent component architecture has let us enable 3rd party applications that just seamlessly integrate with the rest of the core email client. Now with React Native, we might be able to do this with mobile soon too!
Streaming performance itself has always been top notch. Hard to understand how I can start a streaming movie in less time than it takes to load a list of movies in a browser.
It'd be interesting to hear from Netflix on the topic of JSX if they are going to grow their react codebase.
That being said, isomorphic javascript and using the vdom are really attractive and if react starts to lead those fields, then it becomes much harder to ignore.
It uses some of the same ideas like a virtual DOM. Here's a writeup by Ractive's developer where he compares it to React: http://blog.ractivejs.org/posts/whats-the-difference-between...
Is it just aesthetic (xml like)? Is it the precompiler? What is the harm with trying it out?
Designers don't want to dig through JS files to change markup, but an even bigger problem is that it's only kinda-sorta markup. For example, if you want to set a class on an element in JSX, it's not class="", it's className="". Because class is a reserved word in JS. How many other little warts like that are there, and how are they supposed to remember stuff like that? It just wouldn't work without a lot of undue pain.
Its just a single `render` method, generally living at the top or the bottom of a file; nothing complex.
Additionally, you stub out your static html markup first -- just like in a template -- and then you add interactivity. In an ideal world this always happens first.
It took our designer all of two minutes to learn the nuances of JSX -- className, that's it!
I would give it a shot, i'm sure they'll manage :)
A wrinkle I did not mention is that we are in the process of transitioning how we do views. The new stuff is Ractive, but the old stuff is another library whose templates are also straight HTML. So using JSX would not only incur the aforementioned problems but also "wait, this is JSX so I should use this attribute name, and this is HTML so I should use this one." It just sounds shitty to me. And to them.
The situation is not designers can't handle it, the situation is they shouldn't have to deal with that kind of crap.
Now I have to introduce a build step when I'm developing, or do I just say compile it on the client? If I use the new nodejs tools for visual studio, how does it affect debugging? How does it affect completion and highlighting? Does it break node-inspector? Maybe my team uses a bunch of different IDEs and debugging methods, now I have to see which ones break?
For me, it's a non-starter b/c having a framework say, "oh we recommend you write in a different language" seems so completely backwards to me.
I also don't think their justification is very convincing. Basically they say, "markup and code belong together because we think they should and that's why you should use JSX." So basically, they want people to use something that's not javascript because of a design decision they like. Weird.
If you don't like compiling JSX you can run it with the JSX client compiler at the cost of compiling it on every client.
Ractive templates are parsed in JS just like JSX, which is why you have ractive compilers like this
http://techblog.netflix.com/2013/01/reactive-programming-at-...
I'd love to read about the shortcomings of the projects that were shelved after they settled on React.
For what it's worth, we do use Angular on some internal tools.
Something like this maybe?
batchDomChanges(); ... dom changes here ... flushDomChanges();
More specific details here: http://facebook.github.io/react/docs/reconciliation.html
Seriously, what a pointless comment.
That said, Angular gets the job done. It scales better than people think it does (it's inefficient but modern browsers are just so fast it rarely matters) and it's a lot more complete than React. Angular is a full MVC framework while React is just about the V.
What does that even mean? It's very much alive and 1.4 is going to be released this year.
That's like the people who called Perl 5 dead because Perl 6 was announced back in 2000.
Perl 5 is dead in the same way. What programming language would you recommend to someone looking to learn programming?
In 2000, you could make a strong case for Perl.
In 2015, there are a half dozen languages ahead in line.
Anyone new picking up Perl is likely doing it just for a project. Same with angular.
The crazy roadmap to 2.x, and the decisions around 2.x in general just makes it a no-go for new projects at this time.
Typical evolution of new tech is monolithic to micro, frameworks to components/modules/libraries.
In the end micro frameworks or libraries allow more flexibility to change over time.
Always bet on the micro frameworks and libraries, they can be swapped more easily and typically don't create blocks in overall architecture/design.
I'm very happy I picked it for my projects and I'm also very excited about React, which I would probably choose today.