News for hackers. Stuff that matters.
Re:React Hot Loader: Tweak React Components in Real Time by nightski on Monday February 02, 2015 @01:05AM (#8982919)
I like a lot of what I see with react except the lack of 2 way data binding. Mainly, I tend to have input data tables for forecasting, cost estimation, and so forth with a lot of data inter-dependencies and calculations. It seems going back to the method of handling data updates through onchange events in a manual fashion would be a colossal step backwards from say, knockoutjs.
Re:React Hot Loader: Tweak React Components in Real Time by danabramov on Monday February 02, 2015 @06:07AM (#8983634)
Nope. Lack of two-way binding is a blessing. It makes everything predictable.

>It seems going back to the method of handling data updates through onchange events in a manual fashion would be a colossal step backwards from say, knockoutjs.

It's not exactly "manual fashion" because React updates everything according to `state` for you. If you have many interdependent fields, make them update `state` correctly, and React will keep them in sync with it.

In fact I find it easier to make complex input logic with one-way bindings because the data always flows one way. It's a tad more code to write, but you see exactly where your updates are happening and what's causing them.

Two-way binding tends to get very complicated as soon as you need more complex logic. One-way binding doesn't have this problem.

Re:React Hot Loader: Tweak React Components in Real Time by nightski on Monday February 02, 2015 @01:49PM (#8985931)
I'm not sold two-way binding tools get inherently complicated, I just haven't seen this increase in complexity in our current app which is quite large. But I am attracted to react for the reasons you mention, the virtual DOM aspect is very nice so I'll give this a shot.

Although even though ReactLink works it a.) feels like quite the hack (i.e. not very composable) and b.) is a more code to maintain still when it comes down to it.

Re:React Hot Loader: Tweak React Components in Real Time by dlb_ on Monday February 02, 2015 @01:21AM (#8982953)
You can do two-way binding of a form field to the component's state using the ReactLink helper:

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

Re:React Hot Loader: Tweak React Components in Real Time by j_s on Monday February 02, 2015 @11:05AM (#8984812)
Take a look at HN's discussion on Facebook's Data-fetching framework for React (Relay), due for release 'real soon now':

https://news.ycombinator.com/item?id=8977229

Re:React Hot Loader: Tweak React Components in Real Time by nightski on Monday February 02, 2015 @02:03PM (#8986034)
If something can't be described very simply, it scares me away. There are a lot of decent individual ideas and concepts in this gist but from an overall perspective it is very concept-stage stuff which leads me to believe it is a lot farther from a well honed proposal then we are being lead to believe.

If they deliver something concrete and simple it could be great. But there are way too many questions at this point to even start to get excited.