News for hackers. Stuff that matters.
Re:Moving Atom to React by dmak on Wednesday July 02, 2014 @07:22PM (#7980488)
Can this play nicely with Angular and still make use of Angular's two-way binding?
Re:Moving Atom to React by Spendar89 on Wednesday July 02, 2014 @10:33PM (#7981163)
I think its important to note that React does not encourage two way data binding. Quite the opposite, actually. Data is supposed to flow one-way, from parent to child.

That being said, there's an extension that adds two way bindings, called ReactLink. You can read more about it here: http://facebook.github.io/react/docs/two-way-binding-helpers...

Re:Moving Atom to React by josebalius on Wednesday July 02, 2014 @07:51PM (#7980591)
Take a look at http://josebalius.github.io/ngReactGrid/ for an example.
Re:Moving Atom to React by _greim_ on Wednesday July 02, 2014 @10:43PM (#7981191)
I'm not an expert but I think you wouldn't really want to do this as they both want sole control of the chunk of DOM in question.
Re:Moving Atom to React by rdtsc on Wednesday July 02, 2014 @11:34PM (#7981305)
Look at some of Peter Hunt videos:

https://facebook.github.io/react/docs/videos.html

2-way binding is not necessarily the way to go with this.

Re:Moving Atom to React by kalkeo on Thursday July 03, 2014 @04:20AM (#7982056)
good~
Re:Moving Atom to React by deepakprakash on Thursday July 03, 2014 @04:09AM (#7982035)
Yes, and apparently you can take advantage of React's faster/smarter rendering (http://www.williambrownstreet.net/blog/2014/04/faster-angula...)

That said, I would be uncomfortable mixing something as opinionated as Angular with another framework that expects to "own" the DOM/rendering. My guess is that Angular will implement their own version of VDOM in the next few months since it shows demonstrably better performance.

Re:Moving Atom to React by Cthulhu_ on Thursday July 03, 2014 @04:27AM (#7982074)
Pretty much this. AngularJS abstracts DOM manipulation away from the user; by adding React to an AngularJS project, you're giving up on that abstraction. I consider React a sacrifice of abstraction / ease of development in favor of performance.

I think AngularJS will adopt a similar strategy for their 2.0 development effort, maybe even a 1.x point release. But I haven't looked at the angular development process for a while now.

Re:Moving Atom to React by peterhunt on Thursday July 03, 2014 @04:33AM (#7982084)
I disagree with this. React abstracts away DOM manipulation just as well as Angular does at a high level. When you dive deeper (i.e. building components/directives) React continues to abstract it away, whereas Angular reveals it.

In fact, React is able to get superior performance because the DOM is abstracted so far away.

Re:Moving Atom to React by auvrw on Wednesday July 02, 2014 @09:29PM (#7980964)
if all you're after is two-way data binding and don't necessarily need all the other functionality provided by Angular, it might be worth mentioning that React actually can do that, even though it's not a pattern that occurs that often if you use the Flux application architecture

http://facebook.github.io/react/docs/two-way-binding-helpers...

Re:Moving Atom to React by rezistik on Wednesday July 02, 2014 @07:31PM (#7980525)
I'm interested in this as well. I believe some people have had success by attaching components to the window as globals.