Live data from Hacker News

Netflix Likes React

techblog.netflix.com

51–60 of 60 posts

Re: Netflix Likes React

#51

People who chose AngularJS are looking more and more foolish everyday.

Why? It was a very good technology (the best?) at the time, and it remained so for a few years.

I'm very happy I picked it for my projects and I'm also very excited about React, which I would probably choose today.

Re: Netflix Likes React

#52
post #6

Looks like they're using it for the initial profile switcher on desktop, I wonder if it will be making it's way over to the main list soon Pic: http://i.imgur.com/cj9tD1p.png

Which is one thing I absolutely hate about Netflix nowadays! I usually "discover" movies to watch on "instant" directly on my Roku. When I want to use their website, it's because I saw a preview for a movie and want to add it to my (dvd) queue (since I already searched and they didn't have it in "instant"). So I type "netflix.com" in my browser, and wait 5-10 seconds before that screen loads and allows me to choose w…

That's strange indeed, for a couple of reasons. Even with the most JS heavy apps, 10 seconds is way too long. Most apps take 3-5 seconds for the initial load, gmail is the only app I know to take ~10 seconds. The nice thing about React is that it allows you to generate the template on a node server and send that, so you can cut down the initial load time to a second or two.

Re: Netflix Likes React

#53
post #6

Looks like they're using it for the initial profile switcher on desktop, I wonder if it will be making it's way over to the main list soon Pic: http://i.imgur.com/cj9tD1p.png

Which is one thing I absolutely hate about Netflix nowadays! I usually "discover" movies to watch on "instant" directly on my Roku. When I want to use their website, it's because I saw a preview for a movie and want to add it to my (dvd) queue (since I already searched and they didn't have it in "instant"). So I type "netflix.com" in my browser, and wait 5-10 seconds before that screen loads and allows me to choose w…

In this particular case, the Member homepage, there is a lot going on behind the scenes to render that page. Each row is computed with the most recent data possible, to ensure you see information that is pertinent for you. The pause is purely on the server side, not the client downloading assets. We are working on improving this.

Re: Netflix Likes React

#54

Earlier quoted context omitted.

Because when your code changes DOM, browser does not know whether you are going to stop at it for now, or do something else, so it has to re-render. In React you explicitly request application of virtual DOM changes to real DOM once you are done.

In theory they could add some new methods to the DOM api to allow for this, but it would be non-standard and currently none of the browsers have it. Something like this maybe? batchDomChanges(); ... dom changes here ... flushDomChanges();

Or use fastdom[1], which batches reads and writes to reduce layout thrashing.

[1]: https://github.com/wilsonpage/fastdom

Re: Netflix Likes React

#55
post #30
post #24

My experience says Netflix is spot on! 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 s…

Any links on React Native?!

[deleted]

Re: Netflix Likes React

#56
post #30
post #24

My experience says Netflix is spot on! 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 s…

Any links on React Native?!

youtube video from react conf here: https://www.youtube.com/watch?v=KVZ-P-ZI6W4

Re: Netflix Likes React

#57
post #30
post #24

My experience says Netflix is spot on! 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 s…

Any links on React Native?!

[deleted]

Re: Netflix Likes React

#58
post #41

Earlier quoted context omitted.

Yes but WHY don't the browser makers optimize for what seems to be this very common use case? Why does a third party library outperform them?

Because when your code changes DOM, browser does not know whether you are going to stop at it for now, or do something else, so it has to re-render. In React you explicitly request application of virtual DOM changes to real DOM once you are done.

Well I thought that is why there is requestAnimationFrame.

Re: Netflix Likes React

#59
post #21

Earlier quoted context omitted.

If you think React seems interesting but JSX is a turn-off (or in my team's case a total non-starter), you might want to check out Ractive, http://www.ractivejs.org/ . 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...

Curious why JSX is a total non-starter? I've always been intrigued by things that completely invalidate ideas, regardless of how good those ideas appear to be. Is it just aesthetic (xml like)? Is it the precompiler? What is the harm with trying it out?

So, I want to use a pretty lightweight framework, but then I'm not writing javascript anymore? I have to compile it like coffeescript? But what if I'm already using coffeescript? What if I want to use typescript?

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.

Re: Netflix Likes React

#60
post #59
post #21

Earlier quoted context omitted.

Curious why JSX is a total non-starter? I've always been intrigued by things that completely invalidate ideas, regardless of how good those ideas appear to be. Is it just aesthetic (xml like)? Is it the precompiler? What is the harm with trying it out?

So, I want to use a pretty lightweight framework, but then I'm not writing javascript anymore? I have to compile it like coffeescript? But what if I'm already using coffeescript? What if I want to use typescript? 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 completi…

All of this is trivial with the Node.js build ecosystem of 2015 -- all of it!
Post reply on HN