News for hackers. Stuff that matters.
Re:Moving Atom to React by donw on Wednesday July 02, 2014 @07:20PM (#7980478)
Having spent the past two weeks diving deeply into React, this doesn't surprise me. If you haven't tried it out, give it a go.

Being able to rewrite the virtual DOM at will makes development so much cleaner, and it plays incredibly well with other tools, because React is just a presentation layer (I'm using it with Backbone)

There are rough edges (TransitionGroup), but they clearly know what they are doing.

Re:Moving Atom to React by cnp on Wednesday July 02, 2014 @07:29PM (#7980518)
TransitionGroup also annoys me to death. If you have any thoughts on animation please chime in here:

https://groups.google.com/forum/#!topic/reactjs/2-RhZTHxNdc

But yeah, I agree -- development is massively cleaner in nearly every single way.

Re:Moving Atom to React by spicyj on Wednesday July 02, 2014 @08:00PM (#7980620)
Yes, please do chime in -- for animation we're currently blocked on APIs that make sense, not implementation. If anyone has ideas about how animation should work, that thread is a great place to put them.
Re:Moving Atom to React by kalkeo on Thursday July 03, 2014 @04:21AM (#7982059)
why?
Re:Moving Atom to React by Kiro on Thursday July 03, 2014 @03:46AM (#7981975)
Do you have an example where you rewrite the virtual DOM? I don't see anything like that on the React site.
Re:Moving Atom to React by marcins on Thursday July 03, 2014 @05:56AM (#7982242)
I assume they're just referring to how React works under the hood - you just change the data and that cascades down through the components rewriting (ie. changing) only the parts of the virtual DOM that changing, which then get applied to the real DOM.
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.