|
| 1 | +--- |
| 2 | +title: "Community Round-up #4" |
| 3 | +layout: post |
| 4 | +author: Vjeux |
| 5 | +--- |
| 6 | + |
| 7 | +React reconciliation process appears to be very well suited to implement a text editor with a live preview as people at Khan Academy show us. |
| 8 | + |
| 9 | +## Khan Academy |
| 10 | + |
| 11 | +[Ben Kamens](http://bjk5.com/) explains how [Ben Alpert](http://benalpert.com/) and [Joel Burget](http://joelburget.com/) are promoting React inside of [Khan Academy](https://www.khanacademy.org/). They now have three projects in the works using React. |
| 12 | + |
| 13 | +> Recently two Khan Academy devs dropped into our team chat and said they were gonna use React to write a new feature. They even hinted that we may want to adopt it product-wide. |
| 14 | +> |
| 15 | +> "The library is only a week old. It's a brand new way of thinking about things. We're the first to use it outside of Facebook. Heck, even the React devs were surprised to hear we're using this in production!!!" |
| 16 | +> |
| 17 | +> [Read the full post...](http://bjk5.com/post/53742233351/getting-your-team-to-adopt-new-technology) |
| 18 | +
|
| 19 | +The best part is the demo of how React reconciliation process makes live editing more user-friendly. |
| 20 | + |
| 21 | +> Our renderer, post-React, is on the left. A typical math editor's preview is on the right. |
| 22 | +> <figure>[<img src="/react/img/blog/monkeys.gif" width="70%" />](http://bjk5.com/post/53742233351/getting-your-team-to-adopt-new-technology)</figure> |
| 23 | +
|
| 24 | +## React Snippets |
| 25 | + |
| 26 | +Over the past several weeks, members of our team, [Pete Hunt](http://www.petehunt.net/) and [Paul O'Shannessy](http://zpao.com/), answered many questions that were asked in the [React group](https://groups.google.com/forum/#!forum/reactjs). They give a good overview of how to integrate React with other libraries and APIs through the use of [Mixins](/react/docs/mixins.html) and [Lifecycle Methods](/react/docs/advanced-components.html). |
| 27 | + |
| 28 | +> [Listening Scroll Event](https://groups.google.com/forum/#!topic/reactjs/l6PnP8qbofk) |
| 29 | +> |
| 30 | +> * [JSFiddle](http://jsfiddle.net/aabeL/1/): Basically I've given you two mixins. The first lets you react to global scroll events. The second is, IMO, much more useful: it gives you scroll start and scroll end events, which you can use with setState() to create components that react based on whether the user is scrolling or not. |
| 31 | +> |
| 32 | +> [Fade-in Transition](https://groups.google.com/forum/#!topic/reactjs/RVAY_eQmdpo) |
| 33 | +> |
| 34 | +> * [JSFiddle](http://jsfiddle.net/ufe8k/1/): Creating a new `<FadeInWhenAdded>` component and using jQuery `.fadeIn()` function on the DOM node. |
| 35 | +> * [JSFiddle](http://jsfiddle.net/R8f5L/5/): Using CSS transition instead. |
| 36 | +> |
| 37 | +> [Socket.IO Integration](https://groups.google.com/forum/#!topic/reactjs/pyUZBRWcHB4) |
| 38 | +> |
| 39 | +> * [Gist](https://gist.github.com/zpao/5686416): The big thing to notice is that my component is pretty dumb (it doesn't have to be but that's how I chose to model it). All it does is render itself based on the props that are passed in. renderOrUpdate is where the "magic" happens. |
| 40 | +> * [Gist](https://gist.github.com/petehunt/5687230): This example is doing everything -- including the IO -- inside of a single React component. |
| 41 | +> * [Gist](https://gist.github.com/petehunt/5687276): One pattern that we use at Instagram a lot is to employ separation of concerns and consolidate I/O and state into components higher in the hierarchy to keep the rest of the components mostly stateless and purely display. |
| 42 | +> |
| 43 | +> [Sortable jQuery Plugin Integration](https://groups.google.com/forum/#!topic/reactjs/mHfBGI3Qwz4) |
| 44 | +> |
| 45 | +> * [JSFiddle](http://jsfiddle.net/LQxy7/): Your React component simply render empty divs, and then in componentDidMount() you call React.renderComponent() on each of those divs to set up a new root React tree. Be sure to explicitly unmountAndReleaseReactRootNode() for each component in componentWillUnmount(). |
| 46 | +
|
| 47 | +## Introduction to React Screencast |
| 48 | + |
| 49 | +[Pete Hunt](http://www.petehunt.net/) recorded himself implementing a simple `<Blink>` tag in React. |
| 50 | + |
| 51 | +<figure><iframe src="http://player.vimeo.com/video/67248575" width="500" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure> |
| 52 | + |
| 53 | +## Snake in React |
| 54 | + |
| 55 | +[Tom Occhino](http://tomocchino.com/) implemented Snake in 150 lines with React. |
| 56 | + |
| 57 | +> [Check the source on Github](https://github.com/tomocchino/react-snake/blob/master/src/snake.js) |
| 58 | +> <figure>[](http://tomocchino.github.io/react-snake/)</figure> |
0 commit comments