Live data from Hacker News

Yahoo Mail moving to React

slideshare.net

211–220 of 301 posts

Re: Yahoo Mail moving to React

#211

I see a ton of discussion about the NodeJS decision and almost nothing about the more interesting industry paradigm shift to reactive programming and using functional-style programming in an imperative language. They're joining the likes of Facebook, Netflix, Square, Microsoft, Instagram, Khan Academy, SoundCloud, Trello, New York Times, and others in adopting reactive extensions.

Yahoo is moving to the React javascript library. The "react" in React js does not refer to reactive programming in the "Reactive Manifesto"[1] sense. [1] http://www.reactivemanifesto.org/

Good call. It seems a lot of the reactive examples I saw with React involved either RxJS or BaconJS. It's confusing naming for sure!

Re: Yahoo Mail moving to React

#212

I am surprised at all of the hate that Yahoo! is receiving for this, in the comments section of Hacker News (not surprisingly). This is great in my opinion, I think React.js is definitely the future of SPA's especially when combined with the Flux architecture. As someone who has been using React on a daily basis for the last few months, I have a severe man-crush on it. It just makes so much sense, combined with somet…

I really need someone to explain to me what they love so much about React.js. I tried it out and I absolutely hated the way components didn't understand their relation with other components. I had to chain a callback all the way down to my ListItem Component just so it could set which item was selected in the component and let other components know that. If you ever end up adding another parent component you have to…

That's because you used React alone, which works as a top-down view engine. If you want to modify something in the view, you have to go back to the top and modify the model. Instead of doing it manually, Facebook has created the Flux architecture to help you scale this process efficiently.

Re: Yahoo Mail moving to React

#214

Earlier quoted context omitted.

I'm not sure if this is a troll, or if you actually think any non-web developers would volunteer to learn Javascript just to write application code.

I'm a 70%-90% back-end guy with 10-30% front-end work (when necessary). As the companies I work(ed) for evolve from JS => jQuery => Backbone.JS => Backbone.JS + Marionette => EmberJS, so does my skill have to evolve. I also have to write some JS code on top of PhantomJS + CasperJS (not for automation testing but instead for performance monitoring) to support enterprise product at the moment. I used to hate JS with pa…

I'm not sure why you consider the JavaScript ecosystem unstable ? JS has:

- awesome dependency management systems like NPM and Bower

- awesome task runners like Grunt and Gulp

- NPM has thousands of plugins, more than Java's Maven and Ruby Gems [1]

- Github badge support for builds, test coverage, dependency versions and NPM

- Close second best StackOverflow support behind Java (without taking into account Node.js) [2]

Imo it's probably the most modern, stable and evolved ecosystem out there currently.

[1] http://www.modulecounts.com/

[2] http://stackoverflow.com/tags

Re: Yahoo Mail moving to React

#215

I am surprised at all of the hate that Yahoo! is receiving for this, in the comments section of Hacker News (not surprisingly). This is great in my opinion, I think React.js is definitely the future of SPA's especially when combined with the Flux architecture. As someone who has been using React on a daily basis for the last few months, I have a severe man-crush on it. It just makes so much sense, combined with somet…

I really need someone to explain to me what they love so much about React.js. I tried it out and I absolutely hated the way components didn't understand their relation with other components. I had to chain a callback all the way down to my ListItem Component just so it could set which item was selected in the component and let other components know that. If you ever end up adding another parent component you have to…

I think if you need to pass callbacks several levels down you should consider some form of event system so that you may decouple your components from the hierarchy.

Re: Yahoo Mail moving to React

#216

Why on Earth people who aren't merely enthusiasts of "cool async JavaScript with V8" or those who began as a webdevs and knows nothing better than JS and PHP, could choose a single-threaded solution, which blocks the whole app if a single function blocks, and forces programmers to write spaghetti wrappers around asynchronous call-back hells in a non-functional but GC'ed language? I am really too stupid to get it. "Si…

If you have callback hell, it is an expression of muddled thought.

If you have broken your code up into small enough modules and functions, and you know which tasks depend on other tasks, you will not have callback hell.

If you are unclear on the logic of your code, you can often make it work in a messy way with the "laundry list approach". This involves formulating a sequence of tasks that happens to work, without needing to understand the actual dependencies. Many synchronous languages facilitate a laundry list approach, as their inefficient blocking paradigm removes the need to formulate the laundry list as a sequence of nested callbacks. It's still messy code.

Re: Yahoo Mail moving to React

#217
post #151

Earlier quoted context omitted.

Same here, to a greater extent. Why? At the highest level, because it's a language that was chosen based on a whim (not merit) and is now being extensively worked on and showed down everyone's throats. I like languages, plural. I like new languages. I like to have a choice. (And no, I cannot "simply chose something else" if I have to work with people who say every other choice is invalid by default . And yes, this is…

Are you kidding me? Source maps allow you to debug preprocessed as well as minified code. This allows seamless integration of multiple languages into the same ecosystem, libraries, etc.

You develop a language that is sent to the client in plain text. Then you write a lot of code in it. Then you realize that with so much code, file transfers take too long. You write a utility to strip out spaces and comments, as well as change variable names so files are smaller. Okay, so now you have unreadable plaintext files. After juggling minified and unminified version of the same code for some years you realize that debugging like that sucks. You develop a new format that allows you to map minified and unminified files. This format requires support on the browser side, as well as in the minification utility, and it also requires the author of the minified library to provide you with two additional files. You declare victory and pat yourself on the back. The whole process only takes a few years.

Meanwhile, people debugged binaries for several decades before your language even been developed.

Do you see anything wrong with this picture?

Re: Yahoo Mail moving to React

#218
post #142
post #102

Earlier quoted context omitted.

NPM chokes for me about 1 time out of 10. The main repo has reliability issues. A lot of the libs install executables that require sudo. Java solved dependency management years ago. I don't know why every language doesn't just rely on a classpath.

I've never had any issues with npm and I started coding about 2 years ago. In fact I didn't have any issues with npm when I first started. Maybe you need to have a friend show you how to do it correctly. I can't imagine what your issue is.

Same here. No issues in more than two years.

Re: Yahoo Mail moving to React

#219

Earlier quoted context omitted.

> It is possible to build extremely dynamic websites that are not SPAs Possible, but not easier.

Highly debatable. I've had great success developing highly dynamic websites using progressive enhancement and directive/web component like approach. People often smirk when I mention progressive enhancement these days. But the same people often claim that something is "impossible" to do using PE, while it's not only possible, but downwright easy. This makes me think most of them never even tried this approach serious…

I'd like to see someone use progressive enhancement and create an app like google spreadsheets.

Re: Yahoo Mail moving to React

#220
post #167

Earlier quoted context omitted.

Write modules.

That's like saying write classes and methods. Not enough.

Yea, I'm not saying it's a miracle cure, but in general I have found the following to be useful:

1) Break any functionality possible into a separate npm module - not just a separate file with module.exports. Keep the npm module small and break it up further if it gets too big.

2) This module will be small enough that it is trivial to debug, refactor, test, and document. If it gets to a size where these tasks are hard for any reason and you wish for strong typing or something, the module is too big.

3) Please make sure that you do test and document the module. This will make your team way faster in the future.

Post reply on HN