Files
react/feed.xml
T
petehunt fb3bd7f583 language update as suggested by @petehunt
c211767d47 Browse code
fabiomcosta authored 5 hours ago

updating text as suggested by @petehunt
34660eccf9 Browse code
fabiomcosta authored 5 hours ago

Adding note about onScroll on IE8
874122bad4 Browse code
fabiomcosta authored 6 hours ago

Note about react's version on the talk, since somethings have already… …
d22874d039 Browse code
fabiomcosta authored 6 hours ago
2013-12-24 00:51:02 -05:00

714 lines
91 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>React</title>
<description>A JavaScript library for building user interfaces</description>
<link>http://facebook.github.io/react</link>
<atom:link href="http://facebook.github.io/react/feed.xml" rel="self" type="application/rss+xml" />
<item>
<title>Community Round-up #12</title>
<description>&lt;p&gt;React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the &lt;a href=&quot;/react/docs/getting-started.html&quot;&gt;docs&lt;/a&gt; and do not hesitate to ask questions on the &lt;a href=&quot;http://groups.google.com/group/reactjs&quot;&gt;Google Group&lt;/a&gt;, &lt;a href=&quot;irc://chat.freenode.net/reactjs&quot;&gt;IRC&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com/questions/tagged/reactjs&quot;&gt;Stack Overflow&lt;/a&gt;. We are trying our best to help you out!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;the-future-of-javascript-mvc&quot;&gt;&lt;/a&gt;The Future of Javascript MVC &lt;a class=&quot;hash-link&quot; href=&quot;#the-future-of-javascript-mvc&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://swannodette.github.io/&quot;&gt;David Nolen&lt;/a&gt; announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient &lt;a href=&quot;http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate&quot;&gt;shouldComponentUpdate&lt;/a&gt; and get huge performance improvements on some tasks.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We&amp;#39;ve known this for some time over here in the ClojureScript corner of the world - all of our collections are immutable and modeled directly on the original Clojure versions written in Java. Modern JavaScript engines have now been tuned to the point that it&amp;#39;s no longer uncommon to see collection performance within 2.5X of the Java Virtual Machine.&lt;/p&gt;
&lt;p&gt;Wait, wait, wait. What does the performance of persistent data structures have to do with the future of JavaScript MVCs?&lt;/p&gt;
&lt;p&gt;A whole lot.
&lt;figure&gt;&lt;a href=&quot;http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/&quot;&gt;&lt;img src=&quot;/react/img/blog/om-backbone.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/&quot;&gt;Read the full article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;scroll-position-with-react&quot;&gt;&lt;/a&gt;Scroll Position with React &lt;a class=&quot;hash-link&quot; href=&quot;#scroll-position-with-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Managing the scroll position when new content is inserted is usually very tricky to get right. &lt;a href=&quot;http://blog.vjeux.com/&quot;&gt;Vjeux&lt;/a&gt; discovered that &lt;a href=&quot;http://facebook.github.io/react/docs/component-specs.html#updating-componentwillupdate&quot;&gt;componentWillUpdate&lt;/a&gt; and &lt;a href=&quot;http://facebook.github.io/react/docs/component-specs.html#updating-componentdidupdate&quot;&gt;componentDidUpdate&lt;/a&gt; were triggered exactly at the right time to manage the scroll position.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We can check the scroll position before the component has updated with componentWillUpdate and scroll if necessary at componentDidUpdate&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text language-text&quot; data-lang=&quot;text&quot;&gt;componentWillUpdate: function() {
var node = this.getDOMNode();
this.shouldScrollBottom =
(node.scrollTop + node.offsetHeight) === node.scrollHeight;
},
componentDidUpdate: function() {
if (this.shouldScrollBottom) {
var node = this.getDOMNode();
node.scrollTop = node.scrollHeight
}
},
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.vjeux.com/2013/javascript/scroll-position-with-react.html&quot;&gt;Check out the blog article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;lights-out&quot;&gt;&lt;/a&gt;Lights Out &lt;a class=&quot;hash-link&quot; href=&quot;#lights-out&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;React declarative approach is well suited to write games. &lt;a href=&quot;https://github.com/chenglou&quot;&gt;Cheng Lou&lt;/a&gt; wrote the famous Lights Out game in React. It&amp;#39;s a good example of use of &lt;a href=&quot;http://facebook.github.io/react/docs/animation.html&quot;&gt;TransitionGroup&lt;/a&gt; to implement animations.
&lt;figure&gt;&lt;a href=&quot;http://chenglou.github.io/react-lights-out/&quot;&gt;&lt;img src=&quot;/react/img/blog/lights-out.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://chenglou.github.io/react-lights-out/&quot;&gt;Try it out!&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;reactive-table-bookmarklet&quot;&gt;&lt;/a&gt;Reactive Table Bookmarklet &lt;a class=&quot;hash-link&quot; href=&quot;#reactive-table-bookmarklet&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/&quot;&gt;Stoyan Stefanov&lt;/a&gt; wrote a bookmarklet to process tables on the internet. It adds a little &amp;quot;pop&amp;quot; button that expands to a full-screen view with sorting, editing and export to csv and json.
&lt;figure&gt;&lt;a href=&quot;http://www.phpied.com/reactivetable-bookmarklet/&quot;&gt;&lt;img src=&quot;/react/img/blog/reactive-bookmarklet.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/reactivetable-bookmarklet/&quot;&gt;Check out the blog post...&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;montagejs-tutorial-in-react&quot;&gt;&lt;/a&gt;MontageJS Tutorial in React &lt;a class=&quot;hash-link&quot; href=&quot;#montagejs-tutorial-in-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/ssorallen&quot;&gt;Ross Allen&lt;/a&gt; implemented &lt;a href=&quot;http://montagejs.org/&quot;&gt;MontageJS&lt;/a&gt;&amp;#39;s &lt;a href=&quot;http://montagejs.org/docs/tutorial-reddit-client-with-montagejs.html&quot;&gt;Reddit tutorial&lt;/a&gt; in React. This is a good opportunity to compare the philosophies of the two libraries.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/ssorallen/fEsYt/embedded/result,html,js&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;a href=&quot;http://jsfiddle.net/ssorallen/fEsYt/&quot;&gt;View the source on JSFiddle...&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;writing-good-react-components&quot;&gt;&lt;/a&gt;Writing Good React Components &lt;a class=&quot;hash-link&quot; href=&quot;#writing-good-react-components&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.whn.se/&quot;&gt;William Högman Rudenmalm&lt;/a&gt; wrote an article on how to write good React components. This is full of good advice.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The idea of dividing software into smaller parts or components is hardly new - It is the essance of good software. The same principles that apply to software in general apply to building React components. That doesnt mean that writing good React components is just about applying general rules.&lt;/p&gt;
&lt;p&gt;The web offers a unique set of challenges, which React offers interesting solutions to. First and foremost among these solutions is the what is called the Mock DOM. Rather than having user code interface with the DOM in a direct fashion, as is the case with most DOM manipulation libraries.&lt;/p&gt;
&lt;p&gt;You build a model of how you want the DOM end up like. React then inserts this model into the DOM. This is very useful for updates because React simply compares the model or mock DOM against the actual DOM, and then only updates based on the difference between the two states.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.whn.se/post/69621609605/writing-good-react-components&quot;&gt;Read the full article ...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;hoodie-react-todomvc&quot;&gt;&lt;/a&gt;Hoodie React TodoMVC &lt;a class=&quot;hash-link&quot; href=&quot;#hoodie-react-todomvc&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://svenlito.com/&quot;&gt;Sven Lito&lt;/a&gt; integrated the React TodoMVC example within an &lt;a href=&quot;http://hood.ie/&quot;&gt;Hoodie&lt;/a&gt; web app environment. This should let you get started using Hoodie and React.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text language-text&quot; data-lang=&quot;text&quot;&gt;hoodie new todomvc -t &amp;quot;hoodiehq/hoodie-react-todomvc&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/hoodiehq/hoodie-react-todomvc&quot;&gt;Check out on GitHub...&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsx-compiler&quot;&gt;&lt;/a&gt;JSX Compiler &lt;a class=&quot;hash-link&quot; href=&quot;#jsx-compiler&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ever wanted to have a quick way to see what a JSX tag would be converted to? &lt;a href=&quot;http://www.yungsters.com/&quot;&gt;Tim Yung&lt;/a&gt; made a page for it.
&lt;figure&gt;&lt;a href=&quot;http://facebook.github.io/react/jsx-compiler.html&quot;&gt;&lt;img src=&quot;/react/img/blog/jsx-compiler.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://facebook.github.io/react/jsx-compiler.html&quot;&gt;Try it out!&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;random-tweet&quot;&gt;&lt;/a&gt;Random Tweet &lt;a class=&quot;hash-link&quot; href=&quot;#random-tweet&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;center&gt;&lt;blockquote class=&quot;twitter-tweet&quot; lang=&quot;en&quot;&gt;&lt;p&gt;.&lt;a href=&quot;https://twitter.com/jordwalke&quot;&gt;@jordwalke&lt;/a&gt; lays down some truth &lt;a href=&quot;http://t.co/AXAn0UlUe3&quot;&gt;http://t.co/AXAn0UlUe3&lt;/a&gt;, optimizing your JS application shouldn&amp;#39;t force you to rewrite so much code &lt;a href=&quot;https://twitter.com/search?q=%23reactjs&amp;amp;src=hash&quot;&gt;#reactjs&lt;/a&gt;&lt;/p&gt;&amp;mdash; David Nolen (@swannodette) &lt;a href=&quot;https://twitter.com/swannodette/statuses/413780079249215488&quot;&gt;December 19, 2013&lt;/a&gt;&lt;/blockquote&gt;&lt;/center&gt;&lt;/p&gt;
</description>
<pubDate>2013-12-23T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/12/23/community-roundup-12.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/12/23/community-roundup-12.html</guid>
</item>
<item>
<title>React v0.8</title>
<description>&lt;p&gt;I&amp;#39;ll start by answering the obvious question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What happened to 0.6 and 0.7?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;#39;s become increasingly obvious since our launch in May that people want to use React on the server. With the server-side rendering abilities, that&amp;#39;s a perfect fit. However using the same copy of React on the server and then packaging it up for the client is surprisingly a harder problem. People have been using our &lt;code&gt;react-tools&lt;/code&gt; module which includes React, but when browserifying that ends up packaging all of &lt;code&gt;esprima&lt;/code&gt; and some other dependencies that aren&amp;#39;t needed on the client. So we wanted to make this whole experience better.&lt;/p&gt;
&lt;p&gt;We talked with &lt;a href=&quot;https://github.com/jeffbski&quot;&gt;Jeff Barczewski&lt;/a&gt; who was the owner of the &lt;code&gt;react&lt;/code&gt; module on npm. He was kind enough to transition ownership to us and release his package under a different name: &lt;code&gt;autoflow&lt;/code&gt;. I encourage you to &lt;a href=&quot;https://github.com/jeffbski/autoflow&quot;&gt;check it out&lt;/a&gt; if you&amp;#39;re writing a lot of asynchronous code. In order to not break all of &lt;code&gt;react&lt;/code&gt;&amp;#39;s current users of 0.7.x, we decided to bump our version to 0.8 and skip the issue entirely. We&amp;#39;re also including a warning if you use our &lt;code&gt;react&lt;/code&gt; module like you would use the previous package.&lt;/p&gt;
&lt;p&gt;In order to make the transition to 0.8 for our current users as painless as possible, we decided to make 0.8 primarily a bug fix release on top of 0.5. No public APIs were changed (even if they were already marked as deprecated). We haven&amp;#39;t added any of the new features we have in master, though we did take the opportunity to pull in some improvements to internals.&lt;/p&gt;
&lt;p&gt;We hope that by releasing &lt;code&gt;react&lt;/code&gt; on npm, we will enable a new set of uses that have been otherwise difficult. All feedback is welcome!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added support for more attributes:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rows&lt;/code&gt; &amp;amp; &lt;code&gt;cols&lt;/code&gt; for &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;defer&lt;/code&gt; &amp;amp; &lt;code&gt;async&lt;/code&gt; for &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loop&lt;/code&gt; for &lt;code&gt;&amp;lt;audio&amp;gt;&lt;/code&gt; &amp;amp; &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;autoCorrect&lt;/code&gt; for form fields (a non-standard attribute only supported by mobile WebKit)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Improved error messages&lt;/li&gt;
&lt;li&gt;Fixed Selection events in IE11&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;onContextMenu&lt;/code&gt; events&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-with-addons&quot;&gt;&lt;/a&gt;React with Addons &lt;a class=&quot;hash-link&quot; href=&quot;#react-with-addons&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed bugs with TransitionGroup when children were undefined&lt;/li&gt;
&lt;li&gt;Added support for &lt;code&gt;onTransition&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-tools&quot;&gt;&lt;/a&gt;react-tools &lt;a class=&quot;hash-link&quot; href=&quot;#react-tools&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Upgraded &lt;code&gt;jstransform&lt;/code&gt; and &lt;code&gt;esprima-fb&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsxtransformer&quot;&gt;&lt;/a&gt;JSXTransformer &lt;a class=&quot;hash-link&quot; href=&quot;#jsxtransformer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added support for use in IE8&lt;/li&gt;
&lt;li&gt;Upgraded browserify, which reduced file size by ~65KB (16KB gzipped)&lt;/li&gt;
&lt;/ul&gt;
</description>
<pubDate>2013-12-19T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/12/19/react-v0.8.0.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/12/19/react-v0.8.0.html</guid>
</item>
<item>
<title>React v0.5.2, v0.4.2</title>
<description>&lt;p&gt;Today we&amp;#39;re releasing an update to address a potential XSS vulnerability that can arise when using user data as a &lt;code&gt;key&lt;/code&gt;. Typically &amp;quot;safe&amp;quot; data is used for a &lt;code&gt;key&lt;/code&gt;, for example, an id from your database, or a unique hash. However there are cases where it may be reasonable to use user generated content. A carefully crafted piece of content could result in arbitrary JS execution. While we make a very concerted effort to ensure all text is escaped before inserting it into the DOM, we missed one case. Immediately following the discovery of this vulnerability, we performed an audit to ensure we this was the only such vulnerability.&lt;/p&gt;
&lt;p&gt;This only affects v0.5.x and v0.4.x. Versions in the 0.3.x family are unaffected.&lt;/p&gt;
&lt;p&gt;Updated versions are available for immediate download via npm, bower, and on our &lt;a href=&quot;http://facebook.github.io/react/downloads.html&quot;&gt;download page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We take security very seriously at Facebook. For most of our products, users don&amp;#39;t need to know that a security issue has been fixed. But with libraries like React, we need to make sure developers using React have access to fixes to keep their users safe.&lt;/p&gt;
&lt;p&gt;While we&amp;#39;ve encouraged responsible disclosure as part of &lt;a href=&quot;https://www.facebook.com/whitehat/&quot;&gt;Facebook&amp;#39;s whitehat bounty program&lt;/a&gt; since we launched, we don&amp;#39;t have a good process for notifying our users. Hopefully we don&amp;#39;t need to use it, but moving forward we&amp;#39;ll set up a little bit more process to ensure the safety of our users. Ember.js has &lt;a href=&quot;http://emberjs.com/security/&quot;&gt;an excellent policy&lt;/a&gt; which we may use as our model.&lt;/p&gt;
&lt;p&gt;You can learn more about the vulnerability discussed here: &lt;a href=&quot;https://groups.google.com/forum/#!topic/reactjs/OIqxlB2aGfU&quot;&gt;CVE-2013-7035&lt;/a&gt;.&lt;/p&gt;
</description>
<pubDate>2013-12-18T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/12/18/react-v0.5.2-v0.4.2.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/12/18/react-v0.5.2-v0.4.2.html</guid>
</item>
<item>
<title>Community Round-up #11</title>
<description>&lt;p&gt;This round-up is the proof that React has taken off from its Facebook&amp;#39;s root: it features three in-depth presentations of React done by external people. This is awesome, keep them coming!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;super-vanjs-2013-talk&quot;&gt;&lt;/a&gt;Super VanJS 2013 Talk &lt;a class=&quot;hash-link&quot; href=&quot;#super-vanjs-2013-talk&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/steveluscher&quot;&gt;Steve Luscher&lt;/a&gt; working at &lt;a href=&quot;https://leanpub.com/&quot;&gt;LeanPub&lt;/a&gt; made a 30 min talk at &lt;a href=&quot;https://twitter.com/vanjs&quot;&gt;Super VanJS&lt;/a&gt;. He does a remarkable job at explaining why React is so fast with very exciting demos using the HTML5 Audio API.&lt;/p&gt;
&lt;figure&gt;&lt;iframe width=&quot;600&quot; height=&quot;338&quot; src=&quot;//www.youtube.com/embed/1OeXsL5mr4g&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/figure&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-tips&quot;&gt;&lt;/a&gt;React Tips &lt;a class=&quot;hash-link&quot; href=&quot;#react-tips&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://connormcsheffrey.com/&quot;&gt;Connor McSheffrey&lt;/a&gt; and &lt;a href=&quot;https://github.com/chenglou&quot;&gt;Cheng Lou&lt;/a&gt; added a new section to the documentation. It&amp;#39;s a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we &lt;a href=&quot;http://facebook.github.io/react/tips/introduction.html&quot;&gt;encourage you to contribute&lt;/a&gt;!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/inline-styles.html&quot;&gt;Inline Styles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/if-else-in-JSX.html&quot;&gt;If-Else in JSX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/self-closing-tag.html&quot;&gt;Self-Closing Tag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/maximum-number-of-jsx-root-nodes.html&quot;&gt;Maximum Number of JSX Root Nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/style-props-value-px.html&quot;&gt;Shorthand for Specifying Pixel Values in style props&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/children-props-type.html&quot;&gt;Type of the Children props&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/controlled-input-null-value.html&quot;&gt;Value of null for Controlled Input&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/componentWillReceiveProps-not-triggered-after-mounting.html&quot;&gt;&lt;code&gt;componentWillReceiveProps&lt;/code&gt; Not Triggered After Mounting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/props-in-getInitialState-as-anti-pattern.html&quot;&gt;Props in getInitialState Is an Anti-Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/dom-event-listeners.html&quot;&gt;DOM Event Listeners in a Component&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/initial-ajax.html&quot;&gt;Load Initial Data via AJAX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/tips/false-in-jsx.html&quot;&gt;False in JSX&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;intro-to-the-react-framework&quot;&gt;&lt;/a&gt;Intro to the React Framework &lt;a class=&quot;hash-link&quot; href=&quot;#intro-to-the-react-framework&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.pixelingene.com/&quot;&gt;Pavan Podila&lt;/a&gt; wrote an in-depth introduction to React on TutsPlus. This is definitively worth reading.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Within a component-tree, data should always flow down. A parent-component should set the props of a child-component to pass any data from the parent to the child. This is termed as the Owner-Owned pair. On the other hand user-events (mouse, keyboard, touches) will always bubble up from the child all the way to the root component, unless handled in between.
&lt;figure&gt;&lt;a href=&quot;http://dev.tutsplus.com/tutorials/intro-to-the-react-framework--net-35660&quot;&gt;&lt;img src=&quot;/react/img/blog/tutsplus.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dev.tutsplus.com/tutorials/intro-to-the-react-framework--net-35660&quot;&gt;Read the full article ...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;140-characters-textarea&quot;&gt;&lt;/a&gt;140-characters textarea &lt;a class=&quot;hash-link&quot; href=&quot;#140-characters-textarea&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/brainkim&quot;&gt;Brian Kim&lt;/a&gt; wrote a small textarea component that gradually turns red as you reach the 140-characters limit. Because he only changes the background color, React is smart enough not to mess with the text selection.&lt;/p&gt;
&lt;p data-height=&quot;178&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;FECGb&quot; data-user=&quot;brainkim&quot; data-default-tab=&quot;result&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/brainkim/pen/FECGb&#39;&gt;FECGb&lt;/a&gt; by Brian Kim (&lt;a href=&#39;http://codepen.io/brainkim&#39;&gt;@brainkim&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;&lt;/p&gt;
&lt;script async src=&quot;//codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;genesis-skeleton&quot;&gt;&lt;/a&gt;Genesis Skeleton &lt;a class=&quot;hash-link&quot; href=&quot;#genesis-skeleton&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://ericclemmons.github.io/&quot;&gt;Eric Clemmons&lt;/a&gt; is working on a &amp;quot;Modern, opinionated, full-stack starter kit for rapid, streamlined application development&amp;quot;. The version 0.4.0 has just been released and has first-class support for React.
&lt;figure&gt;&lt;a href=&quot;http://genesis-skeleton.com/&quot;&gt;&lt;img src=&quot;/react/img/blog/genesis_skeleton.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;agflow-talk&quot;&gt;&lt;/a&gt;AgFlow Talk &lt;a class=&quot;hash-link&quot; href=&quot;#agflow-talk&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://rz.scale-it.pl/&quot;&gt;Robert Zaremba&lt;/a&gt; working on &lt;a href=&quot;http://www.agflow.com/&quot;&gt;AgFlow&lt;/a&gt; recently talked in Poland about React.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In a nutshell, I presented why we chose React among other available options (ember.js, angular, backbone ...) in AgFlow, where Im leading an application development.&lt;/p&gt;
&lt;p&gt;During the talk a wanted to highlight that React is not about implementing a Model, but a way to construct visible components with some state. React is simple. It is super simple, you can learn it in 1h. On the other hand what is model? Which functionality it should provide? React does one thing and does it the best (for me)!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://rz.scale-it.pl/2013/10/20/frontend_components_in_react.html&quot;&gt;Read the full article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;iframe src=&quot;https://docs.google.com/presentation/d/1JSFbjCuuexwOHCeHWBMNRIJdyfD2Z0ZQwX65WOWkfaI/embed?start=false&quot; frameborder=&quot;0&quot; width=&quot;600&quot; height=&quot;468&quot; allowfullscreen=&quot;true&quot; mozallowfullscreen=&quot;true&quot; webkitallowfullscreen=&quot;true&quot;&gt; &lt;/iframe&gt;&lt;/figure&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsx&quot;&gt;&lt;/a&gt;JSX &lt;a class=&quot;hash-link&quot; href=&quot;#jsx&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://tck.io/&quot;&gt;Todd Kennedy&lt;/a&gt; working at Cond&amp;eacute; Nast wrote &lt;a href=&quot;https://github.com/CondeNast/JSXHint&quot;&gt;JSXHint&lt;/a&gt; and explains in a blog post his perspective on JSX.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Lets start with the elephant in the room: JSX?
Is this some sort of template language? Specifically no. This might have been the first big stumbling block. What looks like to be a templating language is actually an in-line DSL that gets transpiled directly into JavaScript by the JSX transpiler.&lt;/p&gt;
&lt;p&gt;Creating elements in memory is quick -- copying those elements into the DOM is where the slowness occurs. This is due to a variety of issues, most namely reflow/paint. Changing the items in the DOM causes the browser to re-paint the display, apply styles, etc. We want to keep those operations to an absolute minimum, especially if we&amp;#39;re dealing with something that needs to update the DOM frequently.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://tck.io/posts/jsxhint_and_react.html&quot;&gt;Read the full article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;photo-gallery&quot;&gt;&lt;/a&gt;Photo Gallery &lt;a class=&quot;hash-link&quot; href=&quot;#photo-gallery&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://miekd.com/&quot;&gt;Maykel Loomans&lt;/a&gt;, designer at Instagram, wrote a gallery for photos he shot using React.
&lt;figure&gt;&lt;a href=&quot;http://photos.miekd.com/xoxo2013/&quot;&gt;&lt;img src=&quot;/react/img/blog/xoxo2013.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;random-tweet&quot;&gt;&lt;/a&gt;Random Tweet &lt;a class=&quot;hash-link&quot; href=&quot;#random-tweet&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/react/img/blog/steve_reverse.gif&quot; style=&quot;float: right;&quot; /&gt;
&lt;div style=&quot;width: 320px;&quot;&gt;&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p&gt;I think this reversed gif of Steve Urkel best describes my changing emotions towards the React Lib &lt;a href=&quot;http://t.co/JoX0XqSXX3&quot;&gt;http://t.co/JoX0XqSXX3&lt;/a&gt;&lt;/p&gt;&amp;mdash; Ryan Seddon (@ryanseddon) &lt;a href=&quot;https://twitter.com/ryanseddon/statuses/398572848802852864&quot;&gt;November 7, 2013&lt;/a&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;
</description>
<pubDate>2013-11-18T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/11/18/community-roundup-11.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/11/18/community-roundup-11.html</guid>
</item>
<item>
<title>Community Round-up #10</title>
<description>&lt;p&gt;This is the 10th round-up already and React has come quite far since it was open sourced. Almost all new web projects at Khan Academy, Facebook, and Instagram are being developed using React. React has been deployed in a variety of contexts: a Chrome extension, a Windows 8 application, mobile websites, and desktop websites supporting Internet Explorer 8! Language-wise, React is not only being used within JavaScript but also CoffeeScript and ClojureScript.&lt;/p&gt;
&lt;p&gt;The best part is that no drastic changes have been required to support all those use cases. Most of the efforts were targeted at polishing edge cases, performance improvements, and documentation.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;khan-academy---officially-moving-to-react&quot;&gt;&lt;/a&gt;Khan Academy - Officially moving to React &lt;a class=&quot;hash-link&quot; href=&quot;#khan-academy---officially-moving-to-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://joelburget.com/&quot;&gt;Joel Burget&lt;/a&gt; announced at Hack Reactor that new front-end code at Khan Academy should be written in React!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How did we get the rest of the team to adopt React? Using interns as an attack vector! Most full-time devs had already been working on their existing projects for a while and weren&amp;#39;t looking to try something new at the time, but our class of summer interns was just arriving. For whatever reason, a lot of them decided to try React for their projects. Then mentors became exposed through code reviews or otherwise touching the new code. In this way React knowledge diffused to almost the whole team over the summer.&lt;/p&gt;
&lt;p&gt;Since the first React checkin on June 5, we&amp;#39;ve somehow managed to accumulate 23500 lines of jsx (React-flavored js) code. Which is terrifying in a way - that&amp;#39;s a lot of code - but also really exciting that it was picked up so quickly.&lt;/p&gt;
&lt;p&gt;We held three meetings about how we should proceed with React. At the first two we decided to continue experimenting with React and deferred a final decision on whether to adopt it. At the third we adopted the policy that new code should be written in React.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m excited that we were able to start nudging code quality forward. However, we still have a lot of work to do! One of the selling points of this transition is adopting a uniform frontend style. We&amp;#39;re trying to upgrade all the code from (really old) pure jQuery and (regular old) Backbone views / Handlebars to shiny React. At the moment all we&amp;#39;ve done is introduce more fragmentation. We won&amp;#39;t be gratuitously updating working code (if it ain&amp;#39;t broke, don&amp;#39;t fix it), but are seeking out parts of the codebase where we can shoot two birds with one stone by rewriting in React while fixing bugs or adding functionality.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://joelburget.com/backbone-to-react/&quot;&gt;Read the full article&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-rethinking-best-practices&quot;&gt;&lt;/a&gt;React: Rethinking best practices &lt;a class=&quot;hash-link&quot; href=&quot;#react-rethinking-best-practices&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.petehunt.net/&quot;&gt;Pete Hunt&lt;/a&gt;&amp;#39;s talk at JSConf EU 2013 is now available in video.&lt;/p&gt;
&lt;figure&gt;&lt;iframe width=&quot;600&quot; height=&quot;370&quot; src=&quot;//www.youtube.com/embed/x7cQ3mrcKaY&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/figure&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;server-side-react-with-php&quot;&gt;&lt;/a&gt;Server-side React with PHP &lt;a class=&quot;hash-link&quot; href=&quot;#server-side-react-with-php&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/&quot;&gt;Stoyan Stefanov&lt;/a&gt;&amp;#39;s series of articles on React has two new entries on how to execute React on the server to generate the initial page load.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This post is an initial hack to have React components render server-side in PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Problem: Build web UIs&lt;/li&gt;
&lt;li&gt;Solution: React&lt;/li&gt;
&lt;li&gt;Problem: UI built in JS is anti-SEO (assuming search engines are still noscript) and bad for perceived performance (blank page till JS arrives)&lt;/li&gt;
&lt;li&gt;Solution: &lt;a href=&quot;https://github.com/facebook/react-page&quot;&gt;React page&lt;/a&gt; to render the first view&lt;/li&gt;
&lt;li&gt;Problem: Can&amp;#39;t host node.js apps / I have tons of PHP code&lt;/li&gt;
&lt;li&gt;Solution: Use PHP then!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/server-side-react-with-php/&quot;&gt;&lt;strong&gt;Read part 1 ...&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/server-side-react-with-php-part-2/&quot;&gt;&lt;strong&gt;Read part 2 ...&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rendered markup on the server:
&lt;figure&gt;&lt;a href=&quot;http://www.phpied.com/server-side-react-with-php-part-2/&quot;&gt;&lt;img src=&quot;/react/img/blog/react-php.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;todomvc-benchmarks&quot;&gt;&lt;/a&gt;TodoMVC Benchmarks &lt;a class=&quot;hash-link&quot; href=&quot;#todomvc-benchmarks&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Webkit has a &lt;a href=&quot;https://github.com/WebKit/webkit/tree/master/PerformanceTests/DoYouEvenBench&quot;&gt;TodoMVC Benchmark&lt;/a&gt; that compares different frameworks. They recently included React and here are the results (average of 10 runs in Chrome 30):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AngularJS:&lt;/strong&gt; 4043ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AngularJSPerf:&lt;/strong&gt; 3227ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BackboneJS:&lt;/strong&gt; 1874ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EmberJS:&lt;/strong&gt; 6822ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;jQuery:&lt;/strong&gt; 14628ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React:&lt;/strong&gt; 2864ms&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VanillaJS:&lt;/strong&gt; 5567ms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://www.petehunt.net/react/tastejs/benchmark.html&quot;&gt;Try it yourself!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please don&amp;#39;t take those numbers too seriously, they only reflect one very specific use case and are testing code that wasn&amp;#39;t written with performance in mind.&lt;/p&gt;
&lt;p&gt;Even though React scores as one of the fastest frameworks in the benchmark, the React code is simple and idiomatic. The only performance tweak used is the following function:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * This is a completely optional performance enhancement that you can implement&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * on any React component. If you were to delete this method the app would still&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * work correctly (and still be very performant!), we just use it as an example&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; * of how little code it takes to get an order of magnitude performance improvement.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt; */&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;shouldComponentUpdate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nextState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;todo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;todo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;todo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;todo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editing&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editing&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;nextState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editText&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editText&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;By default, React &amp;quot;re-renders&amp;quot; all the components when anything changes. This is usually fast enough that you don&amp;#39;t need to care. However, you can provide a function that can tell whether there will be any change based on the previous and next states and props. If it is faster than re-rendering the component, then you get a performance improvement.&lt;/p&gt;
&lt;p&gt;The fact that you can control when components are rendered is a very important characteristic of React as it gives you control over its performance. We are going to talk more about performance in the future, stay tuned.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;guess-the-filter&quot;&gt;&lt;/a&gt;Guess the filter &lt;a class=&quot;hash-link&quot; href=&quot;#guess-the-filter&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://conr.me&quot;&gt;Connor McSheffrey&lt;/a&gt; implemented a small game using React. The goal is to guess which filter has been used to create the Instagram photo.
&lt;figure&gt;&lt;a href=&quot;http://guessthefilter.com/&quot;&gt;&lt;img src=&quot;/react/img/blog/guess_filter.jpg&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-vs-fruitmachine&quot;&gt;&lt;/a&gt;React vs FruitMachine &lt;a class=&quot;hash-link&quot; href=&quot;#react-vs-fruitmachine&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://trib.tv/&quot;&gt;Andrew Betts&lt;/a&gt;, director of the &lt;a href=&quot;http://labs.ft.com/&quot;&gt;Financial Times Labs&lt;/a&gt;, posted an article comparing &lt;a href=&quot;https://github.com/ftlabs/fruitmachine&quot;&gt;FruitMachine&lt;/a&gt; and React.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Eerily similar, no? Maybe Facebook was inspired by Fruit Machine (after all, we got there first), but more likely, it just shows that this is a pretty decent way to solve the problem, and great minds think alike. We&amp;#39;re graduating to a third phase in the evolution of web best practice - from intermingling of markup, style and behaviour, through a phase in which those concerns became ever more separated and encapsulated, and finally to a model where we can do that separation at a component level. Developments like Web Components show the direction the web community is moving, and frameworks like React and Fruit Machine are in fact not a lot more than polyfills for that promised behaviour to come.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.ft.com/2013/10/client-side-layout-engines-react-vs-fruitmachine/&quot;&gt;Read the full article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Even though we weren&amp;#39;t inspired by FruitMachine (React has been used in production since before FruitMachine was open sourced), it&amp;#39;s great to see similar technologies emerging and becoming popular.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-brunch&quot;&gt;&lt;/a&gt;React Brunch &lt;a class=&quot;hash-link&quot; href=&quot;#react-brunch&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://elucidata.net/&quot;&gt;Matthew McCray&lt;/a&gt; implemented &lt;a href=&quot;https://npmjs.org/package/react-brunch&quot;&gt;react-brunch&lt;/a&gt;, a JSX compilation step for &lt;a href=&quot;http://brunch.io/&quot;&gt;Brunch&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Adds React support to brunch by automatically compiling &lt;code&gt;*.jsx&lt;/code&gt; files.&lt;/p&gt;
&lt;p&gt;You can configure react-brunch to automatically insert a react header (&lt;code&gt;/** @jsx React.DOM */&lt;/code&gt;) into all &lt;code&gt;*.jsx&lt;/code&gt; files. Disabled by default.&lt;/p&gt;
&lt;p&gt;Install the plugin via npm with &lt;code&gt;npm install --save react-brunch&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://npmjs.org/package/react-brunch&quot;&gt;Read more...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;random-tweet&quot;&gt;&lt;/a&gt;Random Tweet &lt;a class=&quot;hash-link&quot; href=&quot;#random-tweet&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I&amp;#39;m going to start adding a tweet at the end of each round-up. We&amp;#39;ll start with this one:&lt;/p&gt;
&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p&gt;This weekend &lt;a href=&quot;https://twitter.com/search?q=%23angular&amp;amp;src=hash&quot;&gt;#angular&lt;/a&gt; died for me. Meet new king &lt;a href=&quot;https://twitter.com/search?q=%23reactjs&amp;amp;src=hash&quot;&gt;#reactjs&lt;/a&gt;&lt;/p&gt;&amp;mdash; Eldar Djafarov &amp;#x30C3; (@edjafarov) &lt;a href=&quot;https://twitter.com/edjafarov/statuses/397033796710961152&quot;&gt;November 3, 2013&lt;/a&gt;&lt;/blockquote&gt;
</description>
<pubDate>2013-11-06T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/11/06/community-roundup-10.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/11/06/community-roundup-10.html</guid>
</item>
<item>
<title>Thinking in React</title>
<description>&lt;p&gt;React is, in my opinion, the premier way to build big, fast Web apps with JavaScript. It&amp;#39;s scaled very well for us at Facebook and Instagram.&lt;/p&gt;
&lt;p&gt;One of the many great parts of React is how it makes you think about apps as you build them. In this post I&amp;#39;ll walk you through the thought process of building a searchable product data table using React.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;start-with-a-mock&quot;&gt;&lt;/a&gt;Start with a mock &lt;a class=&quot;hash-link&quot; href=&quot;#start-with-a-mock&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Imagine that we already have a JSON API and a mock from our designer. Our designer apparently isn&amp;#39;t very good because the mock looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/react/img/blog/thinking-in-react-mock.png&quot; alt=&quot;Mockup&quot;&gt;&lt;/p&gt;
&lt;p&gt;Our JSON API returns some data that looks like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text language-text&quot; data-lang=&quot;text&quot;&gt;[
{category: &amp;quot;Sporting Goods&amp;quot;, price: &amp;quot;$49.99&amp;quot;, stocked: true, name: &amp;quot;Football&amp;quot;},
{category: &amp;quot;Sporting Goods&amp;quot;, price: &amp;quot;$9.99&amp;quot;, stocked: true, name: &amp;quot;Baseball&amp;quot;},
{category: &amp;quot;Sporting Goods&amp;quot;, price: &amp;quot;$29.99&amp;quot;, stocked: false, name: &amp;quot;Basketball&amp;quot;},
{category: &amp;quot;Electronics&amp;quot;, price: &amp;quot;$99.99&amp;quot;, stocked: true, name: &amp;quot;iPod Touch&amp;quot;},
{category: &amp;quot;Electronics&amp;quot;, price: &amp;quot;$399.99&amp;quot;, stocked: false, name: &amp;quot;iPhone 5&amp;quot;},
{category: &amp;quot;Electronics&amp;quot;, price: &amp;quot;$199.99&amp;quot;, stocked: true, name: &amp;quot;Nexus 7&amp;quot;}
];
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;step-1-break-the-ui-into-a-component-hierarchy&quot;&gt;&lt;/a&gt;Step 1: break the UI into a component hierarchy &lt;a class=&quot;hash-link&quot; href=&quot;#step-1-break-the-ui-into-a-component-hierarchy&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first thing you&amp;#39;ll want to do is to draw boxes around every component (and subcomponent) in the mock and give them all names. If you&amp;#39;re working with a designer they may have already done this, so go talk to them! Their Photoshop layer names may end up being the names of your React components!&lt;/p&gt;
&lt;p&gt;But how do you know what should be its own component? Just use the same techniques for deciding if you should create a new function or object. One such technique is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Single_responsibility_principle&quot;&gt;single responsibility principle&lt;/a&gt;, that is, a component should ideally only do one thing. If it ends up growing it should be decomposed into smaller subcomponents.&lt;/p&gt;
&lt;p&gt;Since you&amp;#39;re often displaying a JSON data model to a user, you&amp;#39;ll find that if your model was built correctly your UI (and therefore your component structure) will map nicely onto it. That&amp;#39;s because user interfaces and data models tend to adhere to the same &lt;em&gt;information architecture&lt;/em&gt; which means the work of separating your UI into components is often trivial. Just break it up into components that represent exactly one piece of your data model.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/react/img/blog/thinking-in-react-components.png&quot; alt=&quot;Component diagram&quot;&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll see here that we have five components in our simple app. I&amp;#39;ve italicized the data each component represents.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;FilterableProductTable&lt;/code&gt; (orange):&lt;/strong&gt; contains the entirety of the example&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;SearchBar&lt;/code&gt; (blue):&lt;/strong&gt; receives all &lt;em&gt;user input&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ProductTable&lt;/code&gt; (green):&lt;/strong&gt; displays and filters the &lt;em&gt;data collection&lt;/em&gt; based on &lt;em&gt;user input&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ProductCategoryRow&lt;/code&gt; (turquoise):&lt;/strong&gt; displays a heading for each &lt;em&gt;category&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ProductRow&lt;/code&gt; (red):&lt;/strong&gt; displays a row for each &lt;em&gt;product&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you look at &lt;code&gt;ProductTable&lt;/code&gt; you&amp;#39;ll see that the table header (containing the &amp;quot;Name&amp;quot; and &amp;quot;Price&amp;quot; labels) isn&amp;#39;t its own component. This is a matter of preference and there&amp;#39;s an argument to be made either way. For this example I left it as part of &lt;code&gt;ProductTable&lt;/code&gt; because it is part of rendering the &lt;em&gt;data collection&lt;/em&gt; which is &lt;code&gt;ProductTable&lt;/code&gt;&amp;#39;s responsibility. However if this header grows to be complex (i.e. if we were to add affordances for sorting) it would certainly make sense to make this its own &lt;code&gt;ProductTableHeader&lt;/code&gt; component.&lt;/p&gt;
&lt;p&gt;Now that we&amp;#39;ve identified the components in our mock, let&amp;#39;s arrange them into a hierarchy. This is easy. Components that appear within another component in the mock should appear as a child in the hierarchy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;FilterableProductTable&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SearchBar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ProductTable&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ProductCategoryRow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ProductRow&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;step-2-build-a-static-version-in-react&quot;&gt;&lt;/a&gt;Step 2: Build a static version in React &lt;a class=&quot;hash-link&quot; href=&quot;#step-2-build-a-static-version-in-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/6wQMG/embedded/&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;Now that you have your component hierarchy it&amp;#39;s time to start implementing your app. The easiest way is to build a version that takes your data model and renders the UI but has no interactivity. It&amp;#39;s easiest to decouple these processes because building building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing. We&amp;#39;ll see why.&lt;/p&gt;
&lt;p&gt;To build a static version of your app that renders your data model you&amp;#39;ll want to build components that reuse other components and pass data using &lt;em&gt;props&lt;/em&gt;. &lt;em&gt;props&lt;/em&gt; are a way of passing data from parent to child. If you&amp;#39;re familiar with the concept of &lt;em&gt;state&lt;/em&gt;, &lt;strong&gt;don&amp;#39;t use state at all&lt;/strong&gt; to build this static version. State is reserved only for interactivity, that is, data that changes over time. Since this is a static version of the app you don&amp;#39;t need it.&lt;/p&gt;
&lt;p&gt;You can build top-down or bottom-up. That is, you can either start with building the components higher up in the hierarchy (i.e. starting with &lt;code&gt;FilterableProductTable&lt;/code&gt;) or with the ones lower in it (&lt;code&gt;ProductRow&lt;/code&gt;). In simpler examples it&amp;#39;s usually easier to go top-down and on larger projects it&amp;#39;s easier to go bottom-up and write tests as you build.&lt;/p&gt;
&lt;p&gt;At the end of this step you&amp;#39;ll have a library of reusable components that render your data model. The components will only have &lt;code&gt;render()&lt;/code&gt; methods since this is a static version of your app. The component at the top of the hierarchy (&lt;code&gt;FilterableProductTable&lt;/code&gt;) will take your data model as a prop. If you make a change to your underlying data model and call &lt;code&gt;renderComponent()&lt;/code&gt; again the UI will be updated. It&amp;#39;s easy to see how your UI is updated and where to make changes since there&amp;#39;s nothing complicated going on since React&amp;#39;s &lt;strong&gt;one-way data flow&lt;/strong&gt; (also called &lt;em&gt;one-way binding&lt;/em&gt;) keeps everything modular, easy to reason about, and fast.&lt;/p&gt;
&lt;p&gt;Simply refer to the &lt;a href=&quot;http://facebook.github.io/react/docs/&quot;&gt;React docs&lt;/a&gt; if you need help executing this step.&lt;/p&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;a-brief-interlude-props-vs-state&quot;&gt;&lt;/a&gt;A brief interlude: props vs state &lt;a class=&quot;hash-link&quot; href=&quot;#a-brief-interlude-props-vs-state&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There are two types of &amp;quot;model&amp;quot; data in React: props and state. It&amp;#39;s important to understand the distinction between the two; skim &lt;a href=&quot;http://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html&quot;&gt;the official React docs&lt;/a&gt; if you aren&amp;#39;t sure what the difference is.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;step-3-identify-the-minimal-but-complete-representation-of-ui-state&quot;&gt;&lt;/a&gt;Step 3: Identify the minimal (but complete) representation of UI state &lt;a class=&quot;hash-link&quot; href=&quot;#step-3-identify-the-minimal-but-complete-representation-of-ui-state&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To make your UI interactive you need to be able to trigger changes to your underlying data model. React makes this easy with &lt;strong&gt;state&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To build your app correctly you first need to think of the minimal set of mutable state that your app needs. The key here is DRY: &lt;em&gt;Don&amp;#39;t Repeat Yourself&lt;/em&gt;. Figure out what the absolute minimal representation of the state of your application needs to be and compute everything else you need on-demand. For example, if you&amp;#39;re building a TODO list, just keep an array of the TODO items around; don&amp;#39;t keep a separate state variable for the count. Instead, when you want to render the TODO count simply take the length of the TODO items array.&lt;/p&gt;
&lt;p&gt;Think of all of the pieces of data in our example application. We have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The original list of products&lt;/li&gt;
&lt;li&gt;The search text the user has entered&lt;/li&gt;
&lt;li&gt;The value of the checkbox&lt;/li&gt;
&lt;li&gt;The filtered list of products&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;#39;s go through each one and figure out which one is state. Simply ask three questions about each piece of data:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it passed in from a parent via props? If so, it probably isn&amp;#39;t state.&lt;/li&gt;
&lt;li&gt;Does it change over time? If not, it probably isn&amp;#39;t state.&lt;/li&gt;
&lt;li&gt;Can you compute it based on any other state or props in your component? If so, it&amp;#39;s not state.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The original list of products is passed in as props, so that&amp;#39;s not state. The search text and the checkbox seem to be state since they change over time and can&amp;#39;t be computed from anything. And finally, the filtered list of products isn&amp;#39;t state because it can be computed by combining the original list of products with the search text and value of the checkbox.&lt;/p&gt;
&lt;p&gt;So finally, our state is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The search text the user has entered&lt;/li&gt;
&lt;li&gt;The value of the checkbox&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;step-4-identify-where-your-state-should-live&quot;&gt;&lt;/a&gt;Step 4: Identify where your state should live &lt;a class=&quot;hash-link&quot; href=&quot;#step-4-identify-where-your-state-should-live&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/QvHnx/embedded/&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;OK, so we&amp;#39;ve identified what the minimal set of app state is. Next we need to identify which component mutates, or &lt;em&gt;owns&lt;/em&gt;, this state.&lt;/p&gt;
&lt;p&gt;Remember: React is all about one-way data flow down the component hierarchy. It may not be immediately clear which component should own what state. &lt;strong&gt;This is often the most challenging part for newcomers to understand,&lt;/strong&gt; so follow these steps to figure it out:&lt;/p&gt;
&lt;p&gt;For each piece of state in your application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Identify every component that renders something based on that state.&lt;/li&gt;
&lt;li&gt;Find a common owner component (a single component above all the components that need the state in the hierarchy).&lt;/li&gt;
&lt;li&gt;Either the common owner or another component higher up in the hierarchy should own the state.&lt;/li&gt;
&lt;li&gt;If you can&amp;#39;t find a component where it makes sense to own the state, create a new component simply for holding the state and add it somewhere in the hierarchy above the common owner component.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;#39;s run through this strategy for our application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ProductTable&lt;/code&gt; needs to filter the product list based on state and &lt;code&gt;SearchBar&lt;/code&gt; needs to display the search text and checked state.&lt;/li&gt;
&lt;li&gt;The common owner component is &lt;code&gt;FilterableProductTable&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It conceptually makes sense for the filter text and checked value to live in &lt;code&gt;FilterableProductTable&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cool, so we&amp;#39;ve decided that our state lives in &lt;code&gt;FilterableProductTable&lt;/code&gt;. First, add a &lt;code&gt;getInitialState()&lt;/code&gt; method to &lt;code&gt;FilterableProductTable&lt;/code&gt; that returns &lt;code&gt;{filterText: &amp;#39;&amp;#39;, inStockOnly: false}&lt;/code&gt; to reflect the initial state of your application. Then pass &lt;code&gt;filterText&lt;/code&gt; and &lt;code&gt;inStockOnly&lt;/code&gt; to &lt;code&gt;ProductTable&lt;/code&gt; and &lt;code&gt;SearchBar&lt;/code&gt; as a prop. Finally, use these props to filter the rows in &lt;code&gt;ProductTable&lt;/code&gt; and set the values of the form fields in &lt;code&gt;SearchBar&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can start seeing how your application will behave: set &lt;code&gt;filterText&lt;/code&gt; to &lt;code&gt;&amp;quot;ball&amp;quot;&lt;/code&gt; and refresh your app. You&amp;#39;ll see the data table is updated correctly.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;step-5-add-inverse-data-flow&quot;&gt;&lt;/a&gt;Step 5: Add inverse data flow &lt;a class=&quot;hash-link&quot; href=&quot;#step-5-add-inverse-data-flow&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/3Vs3Q/embedded/&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;So far we&amp;#39;ve built an app that renders correctly as a function of props and state flowing down the hierarchy. Now it&amp;#39;s time to support data flowing the other way: the form components deep in the hierarchy need to update the state in &lt;code&gt;FilterableProductTable&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;React makes this data flow explicit to make it easy to understand how your program works, but it does require a little more typing than traditional two-way data binding. React provides an add-on called &lt;code&gt;ReactLink&lt;/code&gt; to make this pattern as convenient as two-way binding, but for the purpose of this post we&amp;#39;ll keep everything explicit.&lt;/p&gt;
&lt;p&gt;If you try to type or check the box in the current version of the example you&amp;#39;ll see that React ignores your input. This is intentional, as we&amp;#39;ve set the &lt;code&gt;value&lt;/code&gt; prop of the &lt;code&gt;input&lt;/code&gt; to always be equal to the &lt;code&gt;state&lt;/code&gt; passed in from &lt;code&gt;FilterableProductTable&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s think about what we want to happen. We want to make sure that whenever the user changes the form we update the state to reflect the user input. Since components should only update their own state, &lt;code&gt;FilterableProductTable&lt;/code&gt; will pass a callback to &lt;code&gt;SearchBar&lt;/code&gt; that will fire whenever the state should be updated. We can use the &lt;code&gt;onChange&lt;/code&gt; event on the inputs to be notified of it. And the callback passed by &lt;code&gt;FilterableProductTable&lt;/code&gt; will call &lt;code&gt;setState()&lt;/code&gt; and the app will be updated.&lt;/p&gt;
&lt;p&gt;Though this sounds like a lot it&amp;#39;s really just a few lines of code. And it&amp;#39;s really explicit how your data is flowing throughout the app.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;and-thats-it&quot;&gt;&lt;/a&gt;And that&amp;#39;s it &lt;a class=&quot;hash-link&quot; href=&quot;#and-thats-it&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Hopefully this gives you an idea of how to think about building components and applications with React. While it may be a little more typing than you&amp;#39;re used to, remember that code is read far more than it&amp;#39;s written, and it&amp;#39;s extremely easy to read this modular, explicit code. As you start to build large libraries of components you&amp;#39;ll appreciate this explicitness and modularity, and with code reuse your lines of code will start to shrink :)&lt;/p&gt;
</description>
<pubDate>2013-11-05T00:00:00-05:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/11/05/thinking-in-react.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/11/05/thinking-in-react.html</guid>
</item>
<item>
<title>React v0.5.1</title>
<description>&lt;p&gt;This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to &lt;a href=&quot;https://github.com/spicyj&quot;&gt;Ben Alpert&lt;/a&gt;, &lt;a href=&quot;https://github.com/andreypopp&quot;&gt;Andrey Popp&lt;/a&gt;, and &lt;a href=&quot;https://github.com/lrowe&quot;&gt;Laurence Rowe&lt;/a&gt; for their contributions!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed bug with &lt;code&gt;&amp;lt;input type=&amp;quot;range&amp;quot;&amp;gt;&lt;/code&gt; and selection events.&lt;/li&gt;
&lt;li&gt;Fixed bug with selection and focus.&lt;/li&gt;
&lt;li&gt;Made it possible to unmount components from the document root.&lt;/li&gt;
&lt;li&gt;Fixed bug for &lt;code&gt;disabled&lt;/code&gt; attribute handling on non-&lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-with-addons&quot;&gt;&lt;/a&gt;React with Addons &lt;a class=&quot;hash-link&quot; href=&quot;#react-with-addons&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed bug with transition and animation event detection.&lt;/li&gt;
&lt;/ul&gt;
</description>
<pubDate>2013-10-29T00:00:00-04:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/10/29/react-v0-5-1.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/10/29/react-v0-5-1.html</guid>
</item>
<item>
<title>React v0.5</title>
<description>&lt;p&gt;This release is the result of several months of hard work from members of the team and the community. While there are no groundbreaking changes in core, we&amp;#39;ve worked hard to improve performance and memory usage. We&amp;#39;ve also worked hard to make sure we are being consistent in our usage of DOM properties.&lt;/p&gt;
&lt;p&gt;The biggest change you&amp;#39;ll notice as a developer is that we no longer support &lt;code&gt;class&lt;/code&gt; in JSX as a way to provide CSS classes. Since this prop was being converted to &lt;code&gt;className&lt;/code&gt; at the transform step, it caused some confusion when trying to access it in composite components. As a result we decided to make our DOM properties mirror their counterparts in the JS DOM API. There are &lt;a href=&quot;https://github.com/facebook/react/blob/master/src/dom/DefaultDOMPropertyConfig.js#L156&quot;&gt;a few exceptions&lt;/a&gt; where we deviate slightly in an attempt to be consistent internally.&lt;/p&gt;
&lt;p&gt;The other major change in v0.5 is that we&amp;#39;ve added an additional build - &lt;code&gt;react-with-addons&lt;/code&gt; - which adds support for some extras that we&amp;#39;ve been working on including animations and two-way binding. &lt;a href=&quot;/react/docs/addons.html&quot;&gt;Read more about these addons in the docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;thanks-to-our-community&quot;&gt;&lt;/a&gt;Thanks to Our Community &lt;a class=&quot;hash-link&quot; href=&quot;#thanks-to-our-community&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We added &lt;em&gt;22 new people&lt;/em&gt; to the list of authors since we launched React v0.4.1 nearly 3 months ago. With a total of 48 names in our &lt;code&gt;AUTHORS&lt;/code&gt; file, that means we&amp;#39;ve nearly doubled the number of contributors in that time period. We&amp;#39;ve seen the number of people contributing to discussion on IRC, mailing lists, Stack Overflow, and GitHub continue rising. We&amp;#39;ve also had people tell us about talks they&amp;#39;ve given in their local community about React.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s been awesome to see the things that people are building with React, and we can&amp;#39;t wait to see what you come up with next!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Memory usage improvements - reduced allocations in core which will help with GC pauses&lt;/li&gt;
&lt;li&gt;Performance improvements - in addition to speeding things up, we made some tweaks to stay out of slow path code in V8 and Nitro.&lt;/li&gt;
&lt;li&gt;Standardized prop -&amp;gt; DOM attribute process. This previously resulting in additional type checking and overhead as well as confusing cases for users. Now we will always convert your value to a string before inserting it into the DOM.&lt;/li&gt;
&lt;li&gt;Support for Selection events.&lt;/li&gt;
&lt;li&gt;Support for &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent&quot;&gt;Composition events&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Support for additional DOM properties (&lt;code&gt;charSet&lt;/code&gt;, &lt;code&gt;content&lt;/code&gt;, &lt;code&gt;form&lt;/code&gt;, &lt;code&gt;httpEquiv&lt;/code&gt;, &lt;code&gt;rowSpan&lt;/code&gt;, &lt;code&gt;autoCapitalize&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Support for additional SVG properties (&lt;code&gt;rx&lt;/code&gt;, &lt;code&gt;ry&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Support for using &lt;code&gt;getInitialState&lt;/code&gt; and &lt;code&gt;getDefaultProps&lt;/code&gt; in mixins.&lt;/li&gt;
&lt;li&gt;Support mounting into iframes.&lt;/li&gt;
&lt;li&gt;Bug fixes for controlled form components.&lt;/li&gt;
&lt;li&gt;Bug fixes for SVG element creation.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;React.version&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;React.isValidClass&lt;/code&gt; - Used to determine if a value is a valid component constructor.&lt;/li&gt;
&lt;li&gt;Removed &lt;code&gt;React.autoBind&lt;/code&gt; - This was deprecated in v0.4 and now properly removed.&lt;/li&gt;
&lt;li&gt;Renamed &lt;code&gt;React.unmountAndReleaseReactRootNode&lt;/code&gt; to &lt;code&gt;React.unmountComponentAtNode&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Began laying down work for refined performance analysis.&lt;/li&gt;
&lt;li&gt;Better support for server-side rendering - &lt;a href=&quot;https://github.com/facebook/react-page&quot;&gt;react-page&lt;/a&gt; has helped improve the stability for server-side rendering.&lt;/li&gt;
&lt;li&gt;Made it possible to use React in environments enforcing a strict &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Security/CSP/Introducing_Content_Security_Policy&quot;&gt;Content Security Policy&lt;/a&gt;. This also makes it possible to use React to build Chrome extensions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-with-addons-new&quot;&gt;&lt;/a&gt;React with Addons (New!) &lt;a class=&quot;hash-link&quot; href=&quot;#react-with-addons-new&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Introduced a separate build with several &amp;quot;addons&amp;quot; which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. &lt;a href=&quot;/react/docs/addons.html&quot;&gt;Read more in the docs&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsx&quot;&gt;&lt;/a&gt;JSX &lt;a class=&quot;hash-link&quot; href=&quot;#jsx&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;No longer transform &lt;code&gt;class&lt;/code&gt; to &lt;code&gt;className&lt;/code&gt; as part of the transform! This is a breaking change - if you were using &lt;code&gt;class&lt;/code&gt;, you &lt;em&gt;must&lt;/em&gt; change this to &lt;code&gt;className&lt;/code&gt; or your components will be visually broken.&lt;/li&gt;
&lt;li&gt;Added warnings to the in-browser transformer to make it clear it is not intended for production use.&lt;/li&gt;
&lt;li&gt;Improved compatibility for Windows&lt;/li&gt;
&lt;li&gt;Improved support for maintaining line numbers when transforming.&lt;/li&gt;
&lt;/ul&gt;
</description>
<pubDate>2013-10-16T00:00:00-04:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/10/16/react-v0.5.0.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/10/16/react-v0.5.0.html</guid>
</item>
<item>
<title>Community Round-up #9</title>
<description>&lt;p&gt;We organized a React hackathon last week-end in the Facebook Seattle office. 50 people, grouped into 15 teams, came to hack for a day on React. It was a lot of fun and we&amp;#39;ll probably organize more in the future.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/react/img/blog/react-hackathon.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-hackathon-winner&quot;&gt;&lt;/a&gt;React Hackathon Winner &lt;a class=&quot;hash-link&quot; href=&quot;#react-hackathon-winner&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://bold-it.com/&quot;&gt;Alex Swan&lt;/a&gt; implemented &lt;a href=&quot;http://qu.izti.me/&quot;&gt;Qu.izti.me&lt;/a&gt;, a multi-player quiz game. It is real-time via Web Socket and mobile friendly.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The game itself is pretty simple. People join the &amp;quot;room&amp;quot; by going to &lt;a href=&quot;http://qu.izti.me/&quot;&gt;http://qu.izti.me&lt;/a&gt; on their device. Large displays will show a leaderboard along with the game, and small displays (such as phones) will act as personal gamepads. Users will see questions and a choice of answers. The faster you answer, the more points you earn.&lt;/p&gt;
&lt;p&gt;In my opinion, Socket.io and React go together like chocolate and peanut butter. The page was always an accurate representation of the game object.
&lt;figure&gt;&lt;a href=&quot;http://bold-it.com/javascript/facebook-react-example/&quot;&gt;&lt;img src=&quot;/react/img/blog/quiztime.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://bold-it.com/javascript/facebook-react-example/&quot;&gt;Read More...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsconf-eu-talk-rethinking-best-practices&quot;&gt;&lt;/a&gt;JSConf EU Talk: Rethinking Best Practices &lt;a class=&quot;hash-link&quot; href=&quot;#jsconf-eu-talk-rethinking-best-practices&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.petehunt.net/&quot;&gt;Pete Hunt&lt;/a&gt; presented React at JSConf EU. He covers three controversial design decisions of React:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build &lt;strong&gt;components&lt;/strong&gt;, not templates&lt;/li&gt;
&lt;li&gt;Re-render the whole app on every update&lt;/li&gt;
&lt;li&gt;Virtual DOM&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The video will be available soon on the &lt;a href=&quot;http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-best-practices.html&quot;&gt;JSConf EU website&lt;/a&gt;, but in the meantime, here are Pete&amp;#39;s slides:&lt;/p&gt;
&lt;figure&gt;&lt;iframe src=&quot;http://www.slideshare.net/slideshow/embed_code/26589373&quot; width=&quot;550&quot; height=&quot;450&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/figure&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;pump---clojure-bindings-for-react&quot;&gt;&lt;/a&gt;Pump - Clojure bindings for React &lt;a class=&quot;hash-link&quot; href=&quot;#pump---clojure-bindings-for-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://solovyov.net/&quot;&gt;Alexander Solovyov&lt;/a&gt; has been working on React bindings for ClojureScript. This is really exciting as it is using &amp;quot;native&amp;quot; ClojureScript data structures.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ns&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;your&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:require&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;macros&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pump&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;macros&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:refer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;defr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:require&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pump&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;core&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;defr&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Component&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;:get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;initial&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#(identity {:some-value &amp;quot;&amp;quot;})&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;component&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:div&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;test&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;hello&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/piranha/pump&quot;&gt;Check it out on GitHub...&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsxhint&quot;&gt;&lt;/a&gt;JSXHint &lt;a class=&quot;hash-link&quot; href=&quot;#jsxhint&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.selfassembled.org/&quot;&gt;Todd Kennedy&lt;/a&gt; working at &lt;a href=&quot;http://www.condenast.com/&quot;&gt;Cond&amp;eacute; Nast&lt;/a&gt; implemented a wrapper on-top of &lt;a href=&quot;http://www.jshint.com/&quot;&gt;JSHint&lt;/a&gt; that first converts JSX files to JS.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A wrapper around JSHint to allow linting of files containg JSX syntax. Accepts glob patterns. Respects your local .jshintrc file and .gitignore to filter your glob patterns.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text language-text&quot; data-lang=&quot;text&quot;&gt;npm install -g jsxhint
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/CondeNast/JSXHint&quot;&gt;Check it out on GitHub...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;turbo-react&quot;&gt;&lt;/a&gt;Turbo React &lt;a class=&quot;hash-link&quot; href=&quot;#turbo-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/ssorallen&quot;&gt;Ross Allen&lt;/a&gt; working at &lt;a href=&quot;http://mesosphere.io/&quot;&gt;Mesosphere&lt;/a&gt; combined &lt;a href=&quot;https://github.com/rails/turbolinks/&quot;&gt;Turbolinks&lt;/a&gt;, a library used by Ruby on Rails to speed up page transition, and React.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Re-request this page&amp;quot; is just a link to the current page. When you click it, Turbolinks intercepts the GET request and fetchs the full page via XHR.&lt;/p&gt;
&lt;p&gt;The panel is rendered with a random panel- class on each request, and the progress bar gets a random widthX class.&lt;/p&gt;
&lt;p&gt;With Turbolinks alone, the entire &lt;body&gt; would be replaced, and transitions would not happen. In this little demo though, React adds and removes classes and text, and the attribute changes are animated with CSS transitions. The DOM is otherwise left intact.
&lt;figure&gt;&lt;a href=&quot;https://turbo-react.herokuapp.com/&quot;&gt;&lt;img src=&quot;/react/img/blog/turboreact.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://turbo-react.herokuapp.com/&quot;&gt;Check out the demo...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;reactive-table&quot;&gt;&lt;/a&gt;Reactive Table &lt;a class=&quot;hash-link&quot; href=&quot;#reactive-table&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/&quot;&gt;Stoyan Stefanov&lt;/a&gt; continues his series of blog posts about React. This one is an introduction tutorial on rendering a simple table with React.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;React is all about components. So let&amp;#39;s build one.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s call it Table (to avoid any confusion what the component is about).&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Table&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*stuff goeth here*/&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You see that React components are defined using a regular JS object. Some properties and methods of the object such as render() have special meanings, the rest is upforgrabs.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/reactive-table/&quot;&gt;Read the full article...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<pubDate>2013-10-03T00:00:00-04:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/10/03/community-roundup-9.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/10/03/community-roundup-9.html</guid>
</item>
<item>
<title>Community Round-up #8</title>
<description>&lt;p&gt;A lot has happened in the month since our last update. Here are some of the more interesting things we&amp;#39;ve found. But first, we have a couple updates before we share links.&lt;/p&gt;
&lt;p&gt;First, we are organizing a &lt;a href=&quot;http://reactjshack-a-thon.splashthat.com/&quot;&gt;React Hackathon&lt;/a&gt; in Facebook&amp;#39;s Seattle office on Saturday September 28. If you want to hack on React, meet some of the team or win some prizes, feel free to join us!&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve also reached a point where there are too many questions for us to handle directly. We&amp;#39;re encouraging people to ask questions on &lt;a href=&quot;http://stackoverflow.com/questions/tagged/reactjs&quot;&gt;StackOverflow&lt;/a&gt; using the tag &lt;a href=&quot;http://stackoverflow.com/questions/tagged/reactjs&quot;&gt;[reactjs]&lt;/a&gt;. Many members of the team and community have subscribed to the tag, so feel free to ask questions there. We think these will be more discoverable than Google Groups archives or IRC logs.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;javascript-jabber&quot;&gt;&lt;/a&gt;Javascript Jabber &lt;a class=&quot;hash-link&quot; href=&quot;#javascript-jabber&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.petehunt.net/&quot;&gt;Pete Hunt&lt;/a&gt; and &lt;a href=&quot;https://github.com/jordwalke&quot;&gt;Jordan Walke&lt;/a&gt; were interviewed on &lt;a href=&quot;http://javascriptjabber.com/073-jsj-react-with-pete-hunt-and-jordan-walke/&quot;&gt;Javascript Jabber&lt;/a&gt; for an hour. They go over many aspects of React such as 60 FPS, Data binding, Performance, Diffing Algorithm, DOM Manipulation, Node.js support, server-side rendering, JSX, requestAnimationFrame and the community. This is a gold mine of information about React.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;PETE:&lt;/strong&gt; So React was designed all around that. Conceptually, how you build a React app is that every time your data changes, it&amp;#39;s like hitting the refresh button in a server-rendered app. What we do is we conceptually throw out all of the markup and event handlers that you&amp;#39;ve registered and we reset the whole page and then we redraw the entire page. If you&amp;#39;re writing a server-rendered app, handling updates is really easy because you hit the refresh button and you&amp;#39;re pretty much guaranteed to get what you expect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MERRICK:&lt;/strong&gt; That&amp;#39;s true. You don&amp;#39;t get into these odd states.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PETE:&lt;/strong&gt; Exactly, exactly. In order to implement that, we communicate it as a fake DOM. What we&amp;#39;ll do is rather than throw out the actual browser html and event handlers, we have an internal representation of what the page looks like and then we generate a brand new representation of what we want the page to look like. Then we perform this really, really fast diffing algorithm between those two page representations, DOM representations. Then React will compute the minimum set of DOM mutations it needs to make to bring the page up to date.&lt;/p&gt;
&lt;p&gt;Then to finally get to answer your question, that set of DOM mutations then goes into a queue and we can plug in arbitrary flushing strategies for that. For example, when we originally launched React in open source, every setState would immediately trigger a flush to the DOM. That wasn&amp;#39;t part of the contract of setState, but that was just our strategy and it worked pretty well. Then this totally awesome open source contributor Ben Alpert at Khan Academy built a new batching strategy which would basically queue up every single DOM update and state change that happened within an event tick and would execute them in bulk at the end of the event tick.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://javascriptjabber.com/073-jsj-react-with-pete-hunt-and-jordan-walke/&quot;&gt;Read the full conversation ...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;jsxtransformer-trick&quot;&gt;&lt;/a&gt;JSXTransformer Trick &lt;a class=&quot;hash-link&quot; href=&quot;#jsxtransformer-trick&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While this is not going to work for all the attributes since they are camelCased in React, this is a pretty cool trick.&lt;/p&gt;
&lt;div style=&quot;margin-left: 74px;&quot;&gt;&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p&gt;Turn any DOM element into a React.js function: JSXTransformer.transform(&amp;quot;/** &lt;a href=&quot;https://twitter.com/jsx&quot;&gt;@jsx&lt;/a&gt; React.DOM */&amp;quot; + element.innerHTML).code&lt;/p&gt;&amp;mdash; Ross Allen (@ssorallen) &lt;a href=&quot;https://twitter.com/ssorallen/statuses/377105575441489920&quot;&gt;September 9, 2013&lt;/a&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;script async src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;remarkable-react&quot;&gt;&lt;/a&gt;Remarkable React &lt;a class=&quot;hash-link&quot; href=&quot;#remarkable-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/&quot;&gt;Stoyan Stefanov&lt;/a&gt; gave a talk at &lt;a href=&quot;http://braziljs.com.br/&quot;&gt;BrazilJS&lt;/a&gt; about React and wrote an article with the content of the presentation. He goes through the difficulties of writting &lt;em&gt;active apps&lt;/em&gt; using the DOM API and shows how React handles it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So how does exactly React deal with it internally? Two crazy ideas - virtual DOM and synthetic events.&lt;/p&gt;
&lt;p&gt;You define you components in React. It builds a virtual DOM in JavaScript land which is way more efficient. Then it updates the DOM. (And &amp;quot;virtual DOM&amp;quot; is a very big name for what is simply a JavaScript object with nested key-value pairs)&lt;/p&gt;
&lt;p&gt;Data changes. React computes a diff (in JavaScript land, which is, of course, much more efficient) and updates the single table cell that needs to change. React replicates the state of the virtual DOM into the actual DOM only when and where it&amp;#39;s necessary. And does it all at once, in most cases in a single tick of the &lt;code&gt;requestAnimationFrame()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;What about event handlers? They are synthetic. React uses event delegation to listen way at the top of the React tree. So removing a node in the virtual DOM has no effect on the event handling.&lt;/p&gt;
&lt;p&gt;The events are automatically cross-browser (they are React events). They are also much closer to W3C than any browser. That means that for example &lt;code&gt;e.target&lt;/code&gt; works, no need to look for the event object or checking whether it&amp;#39;s &lt;code&gt;e.target&lt;/code&gt; or &lt;code&gt;e.srcElement&lt;/code&gt; (IE). Bubbling and capturing phases also work cross browser. React also takes the liberty of making some small fixes, e.g. the event &lt;code&gt;&amp;lt;input onChange&amp;gt;&lt;/code&gt; fires when you type, not when blur away from the input. And of course, event delegation is used as the most efficient way to handle events. You know that &amp;quot;thou shall use event delegation&amp;quot; is also commonly given advice for making web apps snappy.&lt;/p&gt;
&lt;p&gt;The good thing about the virtual DOM is that it&amp;#39;s all in JavaScript land. You build all your UI in JavaScript. Which means it can be rendered on the server side, so you initial view is fast (and any SEO concerns are addressed). Also, if there are especially heavy operations they can be threaded into WebWorkers, which otherwise have no DOM access.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.phpied.com/remarkable-react/&quot;&gt;Read More ...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;markdown-in-react&quot;&gt;&lt;/a&gt;Markdown in React &lt;a class=&quot;hash-link&quot; href=&quot;#markdown-in-react&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://benalpert.com/&quot;&gt;Ben Alpert&lt;/a&gt; converted &lt;a href=&quot;https://github.com/chjj/marked&quot;&gt;marked&lt;/a&gt;, a Markdown Javascript implementation, in React: &lt;a href=&quot;https://github.com/spicyj/marked-react&quot;&gt;marked-react&lt;/a&gt;. Even without using JSX, the HTML generation is now a lot cleaner. It is also safer as forgetting a call to &lt;code&gt;escape&lt;/code&gt; will not introduce an XSS vulnerability.
&lt;figure&gt;&lt;a href=&quot;https://github.com/spicyj/marked-react/commit/cb70c9df6542c7c34ede9efe16f9b6580692a457&quot;&gt;&lt;img src=&quot;/react/img/blog/markdown_refactor.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;unite-from-bugbusters&quot;&gt;&lt;/a&gt;Unite from BugBusters &lt;a class=&quot;hash-link&quot; href=&quot;#unite-from-bugbusters&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/renajohn&quot;&gt;Renault John Lecoultre&lt;/a&gt; wrote &lt;a href=&quot;https://www.bugbuster.com/&quot;&gt;Unite&lt;/a&gt;, an interactive tool for analyzing code dynamically using React. It integrates with CodeMirror.
&lt;figure&gt;&lt;a href=&quot;https://unite.bugbuster.com/&quot;&gt;&lt;img src=&quot;/react/img/blog/unite.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;reactjs-irc-logs&quot;&gt;&lt;/a&gt;#reactjs IRC Logs &lt;a class=&quot;hash-link&quot; href=&quot;#reactjs-irc-logs&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.vjeux.com/&quot;&gt;Vjeux&lt;/a&gt; re-implemented the display part of the IRC logger in React. Just 130 lines are needed for a performant infinite scroll with timestamps and color-coded author names.&lt;/p&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/vjeux/QL9tz/embedded/&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</description>
<pubDate>2013-09-24T00:00:00-04:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/09/24/community-roundup-8.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/09/24/community-roundup-8.html</guid>
</item>
</channel>
</rss>