Files
react/feed.xml
T
2013-12-02 15:51:23 -08:00

759 lines
99 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 #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='codepen'&gt;See the Pen &lt;a href='http://codepen.io/brainkim/pen/FECGb'&gt;FECGb&lt;/a&gt; by Brian Kim (&lt;a href='http://codepen.io/brainkim'&gt;@brainkim&lt;/a&gt;) on &lt;a href='http://codepen.io'&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-08: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-08: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-08: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-07: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-07: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-07: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-07: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>
<item>
<title>Community Round-up #7</title>
<description>&lt;p&gt;It&amp;#39;s been three months since we open sourced React and it is going well. Some stats so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;114 285 unique visitors on this website&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/facebook/react/stargazers&quot;&gt;1933 stars&lt;/a&gt; and &lt;a href=&quot;https://github.com/facebook/react/network/members&quot;&gt;210 forks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://groups.google.com/forum/#!forum/reactjs&quot;&gt;226 posts on Google Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/vjeux/6335762&quot;&gt;76 Github projects using React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/facebook/react/graphs/contributors&quot;&gt;30 contributors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://facebook.github.io/react/blog/&quot;&gt;15 blog posts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2 early adopters: &lt;a href=&quot;http://benalpert.com/2013/06/09/using-react-to-speed-up-khan-academy.html&quot;&gt;Khan Academy&lt;/a&gt; and &lt;a href=&quot;http://usepropeller.com/blog/posts/from-backbone-to-react/&quot;&gt;Propeller&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;wolfenstein-rendering-engine-ported-to-react&quot;&gt;&lt;/a&gt;Wolfenstein Rendering Engine Ported to React &lt;a class=&quot;hash-link&quot; href=&quot;#wolfenstein-rendering-engine-ported-to-react&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; ported the render code of the web version of Wolfenstein 3D to React. Check out &lt;a href=&quot;http://www.petehunt.net/wolfenstein3D-react/wolf3d.html&quot;&gt;the demo&lt;/a&gt; and &lt;a href=&quot;https://github.com/petehunt/wolfenstein3D-react/blob/master/js/renderer.js#L183&quot;&gt;render.js&lt;/a&gt; file for the implementation.
&lt;figure&gt;&lt;a href=&quot;http://www.petehunt.net/wolfenstein3D-react/wolf3d.html&quot;&gt;&lt;img src=&quot;/react/img/blog/wolfenstein_react.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;react-amp-meteor&quot;&gt;&lt;/a&gt;React &amp;amp; Meteor &lt;a class=&quot;hash-link&quot; href=&quot;#react-amp-meteor&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/benjamn&quot;&gt;Ben Newman&lt;/a&gt; made a &lt;a href=&quot;https://github.com/benjamn/meteor-react/blob/master/lib/mixin.js&quot;&gt;13-lines wrapper&lt;/a&gt; to use React and Meteor together. &lt;a href=&quot;http://www.meteor.com/&quot;&gt;Meteor&lt;/a&gt; handles the real-time data synchronization between client and server. React provides the declarative way to write the interface and only updates the parts of the UI that changed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This repository defines a Meteor package that automatically integrates the React rendering framework on both the client and the server, to complement or replace the default Handlebars templating system.&lt;/p&gt;
&lt;p&gt;The React core is officially agnostic about how you fetch and update your data, so it is far from obvious which approach is the best. This package provides one answer to that question (use Meteor!), and I hope you will find it a compelling combination.&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;MyComponent&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;nx&quot;&gt;mixins&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;nx&quot;&gt;MeteorMixin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;getMeteorState&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;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;foo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;foo&amp;#39;&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;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;render&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;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&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;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/div&amp;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;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Dependencies will be registered for any data accesses performed by getMeteorState so that the component can be automatically re-rendered whenever the data changes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/benjamn/meteor-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;react-page&quot;&gt;&lt;/a&gt;React Page &lt;a class=&quot;hash-link&quot; href=&quot;#react-page&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/jordwalke&quot;&gt;Jordan Walke&lt;/a&gt; implemented a complete React project creator called &lt;a href=&quot;https://github.com/facebook/react-page/&quot;&gt;react-page&lt;/a&gt;. It supports both server-side and client-side rendering, source transform and packaging JSX files using CommonJS modules, and instant reload.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Easy Application Development with React JavaScript
&lt;figure&gt;&lt;a href=&quot;https://github.com/facebook/react-page/&quot;&gt;&lt;img src=&quot;/react/img/blog/react-page.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Server Rendering?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Faster initial page speed:
&lt;ul&gt;
&lt;li&gt;Markup displayed before downloading large JavaScript.&lt;/li&gt;
&lt;li&gt;Markup can be generated more quickly on a fast server than low power client devices.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Faster Development and Prototyping:
&lt;ul&gt;
&lt;li&gt;Instantly refresh your app without waiting for any watch scripts or bundlers.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Easy deployment of static content pages/blogs: just archive using recursive wget.&lt;/li&gt;
&lt;li&gt;SEO benefits of indexability and perf.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;How Does Server Rendering Work?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;react-page&lt;/code&gt; computes page markup on the server, sends it to the client so the user can see it quickly.&lt;/li&gt;
&lt;li&gt;The corresponding JavaScript is then packaged and sent.&lt;/li&gt;
&lt;li&gt;The browser runs that JavaScript, so that all of the event handlers, interactions and update code will run seamlessly on top of the server generated markup.&lt;/li&gt;
&lt;li&gt;From the developer&amp;#39;s (and the user&amp;#39;s) perspective, it&amp;#39;s just as if the rendering occurred on the client, only faster.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/facebook/react-page/&quot;&gt;Try it out ...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<pubDate>2013-08-26T00:00:00-07:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/08/26/community-roundup-7.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/08/26/community-roundup-7.html</guid>
</item>
<item>
<title>Use React and JSX in Python Applications</title>
<description>&lt;p&gt;Today we&amp;#39;re happy to announce the initial release of &lt;a href=&quot;https://github.com/facebook/react-python&quot;&gt;PyReact&lt;/a&gt;, which makes it easier to use React and JSX in your Python applications. It&amp;#39;s designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;usage&quot;&gt;&lt;/a&gt;Usage &lt;a class=&quot;hash-link&quot; href=&quot;#usage&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Transform your JSX files via the provided &lt;code&gt;jsx&lt;/code&gt; module:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;react&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsx&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# For multiple paths, use the JSXTransformer class.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;transformer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;JSXTransformer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jsx_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;js_path&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;my_paths&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;transformer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;jsx_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;js_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# For a single file, you can use a shortcut method.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;jsx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;path/to/input/file.jsx&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;path/to/output/file.js&amp;#39;&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;For full paths to React files, use the &lt;code&gt;source&lt;/code&gt; module:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;react&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# path_for raises IOError if the file doesn&amp;#39;t exist.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;react_js&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path_for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;react.min.js&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;django&quot;&gt;&lt;/a&gt;Django &lt;a class=&quot;hash-link&quot; href=&quot;#django&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;PyReact includes a JSX compiler for &lt;a href=&quot;https://github.com/cyberdelia/django-pipeline&quot;&gt;django-pipeline&lt;/a&gt;. Add it to your project&amp;#39;s pipeline settings like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;PIPELINE_COMPILERS&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;s&quot;&gt;&amp;#39;react.utils.pipeline.JSXCompiler&amp;#39;&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;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;installation&quot;&gt;&lt;/a&gt;Installation &lt;a class=&quot;hash-link&quot; href=&quot;#installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;PyReact is hosted on PyPI, and can be installed with &lt;code&gt;pip&lt;/code&gt;:&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;$ pip install PyReact
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Alternatively, add it into your &lt;code&gt;requirements&lt;/code&gt; file:&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;PyReact==0.1.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt;: PyReact uses &lt;a href=&quot;https://github.com/doloopwhile/PyExecJS&quot;&gt;PyExecJS&lt;/a&gt; to execute the bundled React code, which requires that a JS runtime environment is installed on your machine. We don&amp;#39;t explicitly set a dependency on a runtime environment; Mac OS X comes bundled with one. If you&amp;#39;re on a different platform, we recommend &lt;a href=&quot;https://code.google.com/p/pyv8/&quot;&gt;PyV8&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the initial release, we&amp;#39;ve only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your &lt;a href=&quot;https://github.com/facebook/react-python/blob/master/CONTRIBUTING.md&quot;&gt;contributions&lt;/a&gt;!&lt;/p&gt;
</description>
<pubDate>2013-08-19T00:00:00-07:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/08/19/use-react-and-jsx-in-python-applications.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/08/19/use-react-and-jsx-in-python-applications.html</guid>
</item>
<item>
<title>Community Round-up #6</title>
<description>&lt;p&gt;This is the first Community Round-up where none of the items are from Facebook/Instagram employees. It&amp;#39;s great to see the adoption of React growing.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-game-tutorial&quot;&gt;&lt;/a&gt;React Game Tutorial &lt;a class=&quot;hash-link&quot; href=&quot;#react-game-tutorial&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/CalebCassel&quot;&gt;Caleb Cassel&lt;/a&gt; wrote a &lt;a href=&quot;https://rawgithub.com/calebcassel/react-demo/master/part1.html&quot;&gt;step-by-step tutorial&lt;/a&gt; about making a small game. It covers JSX, State and Events, Embedded Components and Integration with Backbone.
&lt;figure&gt;&lt;a href=&quot;https://rawgithub.com/calebcassel/react-demo/master/part1.html&quot;&gt;&lt;img src=&quot;/react/img/blog/dog-tutorial.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;reactify&quot;&gt;&lt;/a&gt;Reactify &lt;a class=&quot;hash-link&quot; href=&quot;#reactify&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://andreypopp.com/&quot;&gt;Andrey Popp&lt;/a&gt; created a &lt;a href=&quot;http://browserify.org/&quot;&gt;Browserify&lt;/a&gt; helper to compile JSX files.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Browserify v2 transform for &lt;code&gt;text/jsx&lt;/code&gt;. Basic usage is:&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;% browserify -t reactify main.jsx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;reactify&lt;/code&gt; transform activates for files with either &lt;code&gt;.jsx&lt;/code&gt; extension or &lt;code&gt;/** @jsx React.DOM */&lt;/code&gt; pragma as a first line for any &lt;code&gt;.js&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/andreypopp/reactify&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;react-integration-with-este&quot;&gt;&lt;/a&gt;React Integration with Este &lt;a class=&quot;hash-link&quot; href=&quot;#react-integration-with-este&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://daniel.steigerwald.cz/&quot;&gt;Daniel Steigerwald&lt;/a&gt; is now using React within &lt;a href=&quot;https://github.com/steida/este&quot;&gt;Este&lt;/a&gt;, which is a development stack for web apps in CoffeeScript that are statically typed using the Closure Library.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;coffeescript language-coffeescript&quot; data-lang=&quot;coffeescript&quot;&gt;&lt;span class=&quot;nv&quot;&gt;este.demos.react.todoApp = &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;este&lt;/span&gt;&lt;span class=&quot;p&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;create&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/** @lends {React.ReactComponent.prototype} */&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;nv&quot;&gt;render: &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;-&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;@div&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;este&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;demos&lt;/span&gt;&lt;span class=&quot;p&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;todoList&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;items&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&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;s&quot;&gt;&amp;#39;items&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&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;s&quot;&gt;&amp;#39;items&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;@p&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&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;s&quot;&gt;&amp;#39;items&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; items.&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;@form&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;onSubmit&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;@onFormSubmit&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;nx&quot;&gt;@input&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;onChange&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;@onChange&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;value&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&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;s&quot;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;autoFocus&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;ref&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;textInput&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;@button&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;Add &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;si&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;s&quot;&gt;&amp;#39;items&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&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;&lt;a href=&quot;https://github.com/steida/este-library/blob/master/este/demos/thirdparty/react/start.coffee&quot;&gt;Check it out on Github...&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-stylus-boilerplate&quot;&gt;&lt;/a&gt;React Stylus Boilerplate &lt;a class=&quot;hash-link&quot; href=&quot;#react-stylus-boilerplate&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://zaim.github.io/&quot;&gt;Zaim Bakar&lt;/a&gt; shared his boilerplate to get started with Stylus CSS processor.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is my boilerplate React project using Grunt as the build tool, and Stylus as my CSS preprocessor.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Very minimal HTML boilerplate&lt;/li&gt;
&lt;li&gt;Uses Stylus, with nib included&lt;/li&gt;
&lt;li&gt;Uses two build targets:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;grunt build&lt;/code&gt; to compile JSX and Stylus into a development build&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grunt dist&lt;/code&gt; to minify and optimize the development build for production&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/zaim/react-stylus-boilerplate&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;webfui&quot;&gt;&lt;/a&gt;WebFUI &lt;a class=&quot;hash-link&quot; href=&quot;#webfui&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://lisperati.com/&quot;&gt;Conrad Barski&lt;/a&gt;, author of the popular book &lt;a href=&quot;http://landoflisp.com/&quot;&gt;Land of Lisp&lt;/a&gt;, wants to use React for his ClojureScript library called &lt;a href=&quot;https://github.com/drcode/webfui&quot;&gt;WebFUI&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I&amp;#39;m the author of &amp;quot;&lt;a href=&quot;http://landoflisp.com/&quot;&gt;Land of Lisp&lt;/a&gt;&amp;quot; and I love your framework. I built a somewhat similar framework a year ago &lt;a href=&quot;https://github.com/drcode/webfui&quot;&gt;WebFUI&lt;/a&gt; aimed at ClojureScript. My framework also uses global event delegates, a global &amp;quot;render&amp;quot; function, DOM reconciliation, etc just like react.js. (Of course these ideas all have been floating around the ether for ages, always great to see more people building on them.)&lt;/p&gt;
&lt;p&gt;Your implementation is more robust, and so I think the next point release of webfui will simply delegate all the &amp;quot;hard work&amp;quot; to react.js and will only focus on the areas where it adds value (enabling purely functional UI programming in clojurescript, and some other stuff related to streamlining event handling)
&lt;figure&gt;&lt;a href=&quot;https://groups.google.com/forum/#!msg/reactjs/e3bYersyd64/qODfcuBR9LwJ&quot;&gt;&lt;img src=&quot;/react/img/blog/landoflisp.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/#!msg/reactjs/e3bYersyd64/qODfcuBR9LwJ&quot;&gt;Read the full post...&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<pubDate>2013-08-05T00:00:00-07:00</pubDate>
<link>http://facebook.github.io/react/blog/2013/08/05/community-roundup-6.html</link>
<guid isPermaLink="true">http://facebook.github.io/react/blog/2013/08/05/community-roundup-6.html</guid>
</item>
</channel>
</rss>