News for hackers. Stuff that matters.
Re:React v0.13 released by donw on Tuesday March 10, 2015 @06:48PM (#9181299)
I'm curious to see how mixins play out with ES6. While something similar to 'include' in Ruby would be nice, I've got a hard time seeing how that would fly with multiple invocations of getInitialState, for example.

Of course, the big thing we're all waiting for is Native. If that truly offers a bridge, rather than a wrapper, to native APIs from Javascript, then it will be a game-changer.

Re:React v0.13 released by spicyj on Tuesday March 10, 2015 @07:16PM (#9181442)
Most cases of mixins (especially ones that involve state, as you allude to) can be implemented via composition by creating wrapper components instead. This is how Relay (http://facebook.github.io/react/blog/2015/02/20/introducing-...) works and makes different components more contained and easier to reason about. Here's one description of how to develop containers (really, higher-order components) from someone who works on Relay:

https://github.com/ericclemmons/react-resolver/issues/8#issu...

(We know people are excited about React Native and we're working hard to get it out the door – keep your eyes peeled!)

Re:React v0.13 released by acdlite on Tuesday March 10, 2015 @08:17PM (#9181715)
Like spicyj said, the wrapper components pattern works really well. Some people have started referring to this as a separation between "smart" and "dumb" components. For instance, "smart" components do things like fetch data, then pass the data as props to "dumb" components. It's a cleaner separation of concerns than having a single component do everything via a mixin.

This is the pattern that the Flux library I wrote uses: https://github.com/acdlite/flummox/blob/master/docs/api/Flux...

I wrote also wrote a bit about why components are generally preferable to mixins: https://github.com/acdlite/flummox/blob/master/docs/why-flux...

Re:React v0.13 released by funkiee on Wednesday March 11, 2015 @08:58AM (#9183797)
I strongly feel that React Native is going to come out right around F8, but cannot prove it other than that the React team seems to be speaking there and this comment on twitter https://twitter.com/reactjs/status/573872611853123584

I'm getting pretty excited to start working with React Native either way.