mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
930 lines
120 KiB
XML
930 lines
120 KiB
XML
<?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>Introducing Relay and GraphQL</title>
|
||
<description><h2><a class="anchor" name="data-fetching-for-react-applications"></a>Data fetching for React applications <a class="hash-link" href="#data-fetching-for-react-applications">#</a></h2>
|
||
<p>There&#39;s more to building an application than creating a user interface. Data fetching is still a tricky problem, especially as applications become more complicated. At <a href="http://conf.reactjs.com/">React.js Conf</a> we announced two projects we&#39;ve created at Facebook to make data fetching simple for developers, even as a product grows to include dozens of contributors and the application becomes as complex as Facebook itself.</p>
|
||
|
||
<iframe width="560" height="315" src="https://www.youtube.com/embed/9sc8Pyc51uU" frameborder="0" allowfullscreen></iframe>
|
||
|
||
<p>The two projects &mdash; Relay and GraphQL &mdash; have been in use in production at Facebook for some time, and we&#39;re excited to be bringing them to the world as open source in the future. In the meantime, we wanted to share some additional information about the projects here.</p>
|
||
|
||
<script async class="speakerdeck-embed" data-id="7af7c2f33bf9451a892dcd91de55b7c2" data-ratio="1.29456384323641" src="//speakerdeck.com/assets/embed.js"></script>
|
||
<h2><a class="anchor" name="what-is-relay"></a>What is Relay? <a class="hash-link" href="#what-is-relay">#</a></h2>
|
||
<p>Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).</p>
|
||
|
||
<p>Each component specifies its own data dependencies declaratively using a query language called GraphQL. The data is made available to the component via properties on <code>this.props</code>.</p>
|
||
|
||
<p>Developers compose these React components naturally, and Relay takes care of composing the data queries into efficient batches, providing each component with exactly the data that it requested (and no more), updating those components when the data changes, and maintaining a client-side store (cache) of all data.</p>
|
||
<h2><a class="anchor" name="what-is-graphql"></a>What is GraphQL? <a class="hash-link" href="#what-is-graphql">#</a></h2>
|
||
<p>GraphQL is a data querying language designed to describe the complex, nested data dependencies of modern applications. It&#39;s been in production use in Facebook&#39;s native apps for several years.</p>
|
||
|
||
<p>On the server, we configure the GraphQL system to map queries to underlying data-fetching code. This configuration layer allows GraphQL to work with arbitrary underlying storage mechanisms. Relay uses GraphQL as its query language, but it is not tied to a specific implementation of GraphQL.</p>
|
||
<h2><a class="anchor" name="the-value-proposition"></a>The value proposition <a class="hash-link" href="#the-value-proposition">#</a></h2>
|
||
<p>Relay was born out of our experiences building large applications at Facebook. Our overarching goal is to enable developers to create correct, high-performance applications in a straightforward and obvious way. The design enables even large teams to make changes with a high degree of isolation and confidence. Fetching data is hard, dealing with ever-changing data is hard, and performance is hard. Relay aims to reduce these problems to simple ones, moving the tricky bits into the framework and freeing you to concentrate on building your application.</p>
|
||
|
||
<p>By co-locating the queries with the view code, the developer can reason about what a component is doing by looking at it in isolation; it&#39;s not necessary to consider the context where the component was rendered in order to understand it. Components can be moved anywhere in a render hierarchy without having to apply a cascade of modifications to parent components or to the server code which prepares the data payload.</p>
|
||
|
||
<p>Co-location leads developers to fall into the &quot;pit of success&quot;, because they get exactly the data they asked for and the data they asked for is explicitly defined right next to where it is used. This means that performance becomes the default (it becomes much harder to accidentally over-fetch), and components are more robust (under-fetching is also less likely for the same reason, so components won&#39;t try to render missing data and blow up at runtime).</p>
|
||
|
||
<p>Relay provides a predictable environment for developers by maintaining an invariant: a component won&#39;t be rendered until all the data it requested is available. Additionally, queries are defined statically (ie. we can extract queries from a component tree before rendering) and the GraphQL schema provides an authoritative description of what queries are valid, so we can validate queries early and fail fast when the developer makes a mistake.</p>
|
||
|
||
<p>Only the fields of an object that a component explicitly asks for will be accessible to that component, even if other fields are known and cached in the store (because another component requested them). This makes it impossible for implicit data dependency bugs to exist latently in the system.</p>
|
||
|
||
<p>By handling all data-fetching via a single abstraction, we&#39;re able to handle a bunch of things that would otherwise have to be dealt with repeatedly and pervasively across the application:</p>
|
||
|
||
<ul>
|
||
<li><strong>Performance:</strong> All queries flow through the framework code, where things that would otherwise be inefficient, repeated query patterns get automatically collapsed and batched into efficient, minimal queries. Likewise, the framework knows which data have been previously requested, or for which requests are currently &quot;in flight&quot;, so queries can be automatically de-duplicated and the minimal queries can be produced.</li>
|
||
<li><strong>Subscriptions:</strong> All data flows into a single store, and all reads from the store are via the framework. This means the framework knows which components care about which data and which should be re-rendered when data changes; components never have to set up individual subscriptions.</li>
|
||
<li><strong>Common patterns:</strong> We can make common patterns easy. Pagination is the example that <a href="https://twitter.com/jingc">Jing</a> gave at the conference: if you have 10 records initially, getting the next page just means declaring you want 15 records in total, and the framework automatically constructs the minimal query to grab the delta between what you have and what you need, requests it, and re-renders your view when the data become available.</li>
|
||
<li><strong>Simplified server implementation:</strong> Rather than having a proliferation of end-points (per action, per route), a single GraphQL endpoint can serve as a facade for any number of underlying resources.</li>
|
||
<li><strong>Uniform mutations:</strong> There is one consistent pattern for performing mutations (writes), and it is conceptually baked into the data querying model itself. You can think of a mutation as a query with side-effects: you provide some parameters that describe the change to be made (eg. attaching a comment to a record) and a query that specifies the data you&#39;ll need to update your view of the world after the mutation completes (eg. the comment count on the record), and the data flows through the system using the normal flow. We can do an immediate &quot;optimistic&quot; update on the client (ie. update the view under the assumption that the write will succeed), and finally commit it, retry it or roll it back in the event of an error when the server payload comes back.</li>
|
||
</ul>
|
||
<h2><a class="anchor" name="how-does-it-relate-to-flux"></a>How does it relate to Flux? <a class="hash-link" href="#how-does-it-relate-to-flux">#</a></h2>
|
||
<p>In some ways Relay is inspired by Flux, but the mental model is much simpler. Instead of multiple stores, there is one central store that caches all GraphQL data. Instead of explicit subscriptions, the framework itself can track which data each component requests, and which components should be updated whenever the data change. Instead of actions, modifications take the form of mutations.</p>
|
||
|
||
<p>At Facebook, we have apps built entirely using Flux, entirely using Relay, or with both. One pattern we see emerging is letting Relay manage the bulk of the data flow for an application, but using Flux stores on the side to handle a subset of application state.</p>
|
||
<h2><a class="anchor" name="open-source-plans"></a>Open source plans <a class="hash-link" href="#open-source-plans">#</a></h2>
|
||
<p>We&#39;re working very hard right now on getting both GraphQL (a spec, and a reference implementation) and Relay ready for public release (no specific dates yet, but we are super excited about getting these out there).</p>
|
||
|
||
<p>In the meantime, we&#39;ll be providing more and more information in the form of blog posts (and in <a href="https://gist.github.com/wincent/598fa75e22bdfa44cf47">other channels</a>). As we get closer to the open source release, you can expect more concrete details, syntax and API descriptions and more.</p>
|
||
|
||
<p>Watch this space!</p>
|
||
</description>
|
||
<pubDate>2015-02-20T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2015/02/20/introducing-relay-and-graphql.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2015/02/20/introducing-relay-and-graphql.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React.js Conf Round-up 2015</title>
|
||
<description><p>It was a privilege to welcome the React community to Facebook HQ on January 28–29 for the first-ever React.js Conf, and a pleasure to be be able to unveil three new technologies that we&#39;ve been using internally at Facebook for some time: GraphQL, Relay, and React Native.</p>
|
||
<h2><a class="anchor" name="the-talks"></a>The talks <a class="hash-link" href="#the-talks">#</a></h2>
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-keynote"></a>Keynote <a class="hash-link" href="#talk-keynote">#</a></h3>
|
||
<p>
|
||
<strong>Tom Occhino</strong> opened with a history of how React came to be, before announcing Facebook’s answer to a long-looming what-if question: what if we could use React to target something other than the DOM?
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/KVZ-P-ZI6W4" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-tweak"></a>Tweaking in real time <a class="hash-link" href="#talk-tweak">#</a></h3>
|
||
<p>
|
||
<strong>Brenton Simpson</strong> showed us how eBay brings Bret Victor’s feedback loop to your favorite editor using Webpack, react-hot-loader, and <a href="https://github.com/appsforartists/ambidex">Ambidex</a>.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/yaymfLj5tjA" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-ast"></a>Abstract Syntax Trees <a class="hash-link" href="#talk-ast">#</a></h3>
|
||
<p>
|
||
<strong>Gurdas Nijor</strong> showed us how we can leverage some conventions of React to perform source code transformations that unlock an inspirational set of use cases.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/OZGgVxFxSIs" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-relay-graphql"></a>Relay and GraphQL <a class="hash-link" href="#talk-relay-graphql">#</a></h3>
|
||
<p>
|
||
<strong>Daniel Schafer</strong> and <strong>Jing Chen</strong> showed us how Facebook approaches data fetching with React, giving us an early peek at the forthcoming duo of Relay and GraphQL.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/9sc8Pyc51uU" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-channels"></a>Channels <a class="hash-link" href="#talk-channels">#</a></h3>
|
||
<p>
|
||
<strong>James Long</strong> explores what might happen if we introduce channels, a new style of coordinating actions, to React.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/W2DgDNQZOwo" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-router"></a>React Router <a class="hash-link" href="#talk-router">#</a></h3>
|
||
<p>
|
||
<strong>Michael Jackson</strong> reminded us that URLs should be part of our design process, and showed us how <a href="https://github.com/rackt/react-router">react-router</a> can help to manage the transitions between them.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/XZfvW1a8Xac" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-full-stack-flux"></a>Full-stack Flux <a class="hash-link" href="#talk-full-stack-flux">#</a></h3>
|
||
<p>
|
||
<strong>Pete Hunt</strong> showed us how a Flux approach can help us scale actions and questions on the backend in addition to the frontend.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/KtmjkCuV-EU" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-performance"></a>High-performance <a class="hash-link" href="#talk-performance">#</a></h3>
|
||
<p>
|
||
<strong>Jason Bonta</strong> showed us how complex user interfaces can get, and how his team keeps them performant as they scale. He also had the pleasure of open-sourcing his team’s work on <a href="http://facebook.github.io/fixed-data-table/">FixedDataTable</a>.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/KYzlpRvWZ6c" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-intl"></a>FormatJS and react-intl <a class="hash-link" href="#talk-intl">#</a></h3>
|
||
<p>
|
||
<strong>Eric Ferraiuolo</strong> showed how you can bring your app to a worldwide audience using a series of polyfills and emerging ECMAScript APIs.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/Sla-DkvmIHY" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-hype"></a>Hype! <a class="hash-link" href="#talk-hype">#</a></h3>
|
||
<p>
|
||
<strong>Ryan Florence</strong> showed us how easy it is to transition from a career selling life insurance, to a burgeoning one as a software developer. All you have to do is to learn how to say “yes.”
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/z5e7kWSHWTg" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-native"></a>React Native <a class="hash-link" href="#talk-native">#</a></h3>
|
||
<p>
|
||
<strong>Christopher Chedeau</strong> showed us how to bring the developer experience of working with React on the web to native app development, using React Native.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/7rDsRXj9-cU" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-components"></a>Components <a class="hash-link" href="#talk-components">#</a></h3>
|
||
<p>
|
||
<strong>Andrew Rota</strong> explained how React and Web Components can work together, and how to avoid some common pitfalls.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/g0TD0efcwVg" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-immutable"></a>Immutability <a class="hash-link" href="#talk-immutable">#</a></h3>
|
||
<p>
|
||
<strong>Lee Byron</strong> led a master-class on persistent immutable data structures, showing us the world of possibility that they can unlock for your software, and perhaps Javascript in general.
|
||
</p>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/I7IdS-PbEgI" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-gibbon"></a>Beyond the DOM <a class="hash-link" href="#talk-gibbon">#</a></h3>
|
||
<p>
|
||
<strong>Jafar Husain</strong> told us a story about how Netflix was able to push React into places where the DOM could not go.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/eNC0mRYGWgc" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-visualization"></a>Data Visualization <a class="hash-link" href="#talk-visualization">#</a></h3>
|
||
<p>
|
||
<strong>Zach Nation</strong> showed us how we can produce visualizations from over 45 million data points without breaking a sweat.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/2ii1lEkIv1s" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-refracted"></a>React Refracted <a class="hash-link" href="#talk-refracted">#</a></h3>
|
||
<p>
|
||
<strong>David Nolen</strong> gave us a view of React from a non-JavaScript perspective, challenging some common intuition along the way.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/5hGHdETNteE" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-flux-panel"></a>Flux Panel <a class="hash-link" href="#talk-flux-panel">#</a></h3>
|
||
<p>
|
||
<strong>Bill Fisher</strong> coordinated a Flux panel together with <strong>Michael Ridgway</strong>, <strong>Spike Brehm</strong>, <strong>Andres Suarez</strong>, <strong>Jing Chen</strong>, <strong>Ian Obermiller</strong>, and <strong>Kyle Davis</strong>.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/LTj4O7WJJ98" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-communication"></a>Component communication <a class="hash-link" href="#talk-communication">#</a></h3>
|
||
<p>
|
||
<strong>Bonnie Eisenman</strong> led us through the ‘adapter’ approach to inter-component communication taken by her team at Codecademy.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/ZM6wXoFTY3o" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-typescript"></a>Flow and TypeScript <a class="hash-link" href="#talk-typescript">#</a></h3>
|
||
<p>
|
||
<strong>James Brantly</strong> demonstrated how we can reap the benefits of static typing using both Flow and TypeScript.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/9PTa9-PPVAc" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<h3 style="margin-top:0"><a class="anchor" name="talk-qa"></a>Core Team Q&amp;A <a class="hash-link" href="#talk-qa">#</a></h3>
|
||
<p>
|
||
<strong>Tom Occhino</strong>, <strong>Ben Alpert</strong>, <strong>Lee Byron</strong>, <strong>Christopher Chedeau</strong>, <strong>Sebastian Markbåge</strong>, <strong>Jing Chen</strong>, and <strong>Dan Schafer</strong> closed the conference with a Q&amp;A session.
|
||
</div>
|
||
<div class="skinny-col">
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/EPpkboSKvPI" frameborder="0" allowfullscreen></iframe>
|
||
</div>
|
||
</div>
|
||
<h2><a class="anchor" name="reactions"></a>Reactions <a class="hash-link" href="#reactions">#</a></h2>
|
||
<p>The conference is over, but the conversation has just begun.</p>
|
||
|
||
<p><strong>Mihai Parparita</strong> detailed his efforts to <a href="http://blog.persistent.info/2014/12/html-munging-my-way-to-reactjs-conf.html">hack his way to a React.js Conf ticket</a>; <strong>James Long</strong> blogged about <a href="http://jlongster.com/First-Impressions-using-React-Native">his first encounter with React Native</a>; <strong>Eric Florenzano</strong> talked about how he perceives the <a href="https://medium.com/@ericflo/facebook-just-taught-us-all-how-to-build-websites-51f1e7e996f2">impact of Relay, GraphQL, and React Native</a> on software development; <strong>Margaret Staples</strong> blogged about her experience of <a href="http://deadlugosi.blogspot.com/2015/02/facebook-gave-me-ice-cream.html">being on-campus at Facebook HQ</a>; <strong>Jeff Barczewski</strong> tied his experience of attending the conference up with a bow in this <a href="http://codewinds.com/blog/2015-02-04-reactjs-conf.html">blog post filled with photos, videos, and links</a>; <strong>Kevin Old</strong> left us with <a href="http://kevinold.com/2015/01/31/takeaways-from-reactjs-conf-2015.html">his takeaways</a>; <strong>Paul Wittmann</strong> found React Native <a href="http://www.railslove.com/stories/fresh-on-our-radar-react-native">freshly on his radar</a>; and finally, undeterred by not being able to attend the conference in person, <strong>Justin Ball</strong> <a href="http://www.justinball.com/2015/02/03/i-didn&#x27;t-attend-react.js-conf/">summarized it from afar</a>.</p>
|
||
|
||
<p>And, in case you missed a session, you can borrow <strong>Michael Chan’s</strong> <a href="http://chantastic.io/2015-reactjs-conf/">drawings</a>, <strong>Mihai Parparita’s</strong> <a href="https://quip.com/uJQeABv7nkFN">summary</a>, or <strong>Shaohua Zhou’s</strong> <a href="http://getshao.com/2015/01/29/react-js-conf-notes-day1/">day 1</a> / <a href="http://getshao.com/2015/01/29/react-js-conf-notes-day-2/">day 2</a> notes.</p>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" lang="en"><p>Notes from <a href="https://twitter.com/dlschafer">@dlschafer</a> and <a href="https://twitter.com/jingc">@jingc</a>&#39;s <a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a> talk &quot;Data fetching for React applications at Facebook&quot; <a href="http://t.co/IUZUbDCDMQ">pic.twitter.com/IUZUbDCDMQ</a></p>&mdash; Michael Chan (@chantastic) <a href="https://twitter.com/chantastic/status/560538533161472000">January 28, 2015</a></blockquote>
|
||
<blockquote class="twitter-tweet" lang="en"><p>This is just magical (in the good way)… GraphQL + Relay is amazing. <a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a></p>&mdash; Chris Williams (@voodootikigod) <a href="https://twitter.com/voodootikigod/status/560533225395589120">January 28, 2015</a></blockquote>
|
||
<blockquote class="twitter-tweet" lang="en"><p>These… these are my people. :) <a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a></p>&mdash; Thomas Beirne (@Beirnet) <a href="https://twitter.com/Beirnet/status/560317879501848576">January 28, 2015</a></blockquote>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" lang="en"><p>Humbled by the React team and community. Found <a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a> very mindful, practical and just real.</p>&mdash; xnoɹǝʃ uɐıɹq (@brianleroux) <a href="https://twitter.com/brianleroux/status/560972130112655360">January 30, 2015</a></blockquote>
|
||
<blockquote class="twitter-tweet" lang="en"><p>I say with confidence as a former UIKit author: React&#39;s model for the UI layer is vastly better than UIKit&#39;s. React Native is a *huge* deal.</p>&mdash; Andy Matuschak (@andy_matuschak) <a href="https://twitter.com/andy_matuschak/status/560511204867575808">January 28, 2015</a></blockquote>
|
||
<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a> was incredible. Amazing project stewardship and community. Boring prediction, React Native sends adoption vertical in 2015.</p>&mdash; David Nolen (@swannodette) <a href="https://twitter.com/swannodette/status/561232290273980416">January 30, 2015</a></blockquote>
|
||
<blockquote class="twitter-tweet" lang="en"><p>I really love the community shout outs by <a href="https://twitter.com/Vjeux">@vjeux</a> between talks at <a href="https://twitter.com/hashtag/reactjsconf?src=hash">#reactjsconf</a>!</p>&mdash; Andrew Rota (@AndrewRota) <a href="https://twitter.com/AndrewRota/status/560927339522297856">January 29, 2015</a></blockquote>
|
||
</div>
|
||
</div>
|
||
|
||
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||
|
||
<p><strong>All proceeds from React.js Conf 2015 were donated to the wonderful programs at <a href="http://code.org">code.org</a></strong>. These programs aim to increase access to the field of computer science by underrepresented members of our community. Watch this video to learn more.</p>
|
||
|
||
<iframe width="305" height="171" src="https://www.youtube.com/embed/FC5FbmsH4fw" frameborder="0" allowfullscreen></iframe>
|
||
</description>
|
||
<pubDate>2015-02-18T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2015/02/18/react-conf-roundup-2015.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2015/02/18/react-conf-roundup-2015.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React v0.13.0 Beta 1</title>
|
||
<description><p>React 0.13 has a lot of nice features but there is one particular feature that I&#39;m really excited about. I couldn&#39;t wait for React.js Conf to start tomorrow morning.</p>
|
||
|
||
<p>Maybe you&#39;re like me and staying up late excited about the conference, or maybe you weren&#39;t one of the lucky ones to get a ticket. Either way I figured I&#39;d give you all something to play with until then.</p>
|
||
|
||
<p>We just published a beta version of React v0.13.0 to <a href="https://www.npmjs.com/package/react">npm</a>! You can install it with <code>npm install react@0.13.0-beta.1</code>. Since this is a pre-release, we don&#39;t have proper release notes ready.</p>
|
||
|
||
<p>So what is that one feature I&#39;m so excited about that I just couldn&#39;t wait to share?</p>
|
||
<h2><a class="anchor" name="plain-javascript-classes"></a>Plain JavaScript Classes!! <a class="hash-link" href="#plain-javascript-classes">#</a></h2>
|
||
<p>JavaScript originally didn&#39;t have a built-in class system. Every popular framework built their own, and so did we. This means that you have a learn slightly different semantics for each framework.</p>
|
||
|
||
<p>We figured that we&#39;re not in the business of designing a class system. We just want to use whatever is the idiomatic JavaScript way of creating classes.</p>
|
||
|
||
<p>In React 0.13.0 you no longer need to use <code>React.createClass</code> to create React components. If you have a transpiler you can use ES6 classes today. You can use the transpiler we ship with <code>react-tools</code> by making use of the harmony option: <code>jsx --harmony</code>.</p>
|
||
<h3><a class="anchor" name="es6-classes"></a>ES6 Classes <a class="hash-link" href="#es6-classes">#</a></h3><div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kr">class</span> <span class="nx">HelloMessage</span> <span class="kr">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
|
||
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">return</span> <span class="o">&lt;</span><span class="nx">div</span><span class="o">&gt;</span><span class="nx">Hello</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">name</span><span class="p">}</span><span class="o">&lt;</span><span class="err">/div&gt;;</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
|
||
<span class="nx">React</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="o">&lt;</span><span class="nx">HelloMessage</span> <span class="nx">name</span><span class="o">=</span><span class="s2">&quot;Sebastian&quot;</span> <span class="o">/&gt;</span><span class="p">,</span> <span class="nx">mountNode</span><span class="p">);</span>
|
||
</code></pre></div>
|
||
<p>The API is mostly what you would expect, with the exception for <code>getInitialState</code>. We figured that the idiomatic way to specify class state is to just use a simple instance property. Likewise <code>getDefaultProps</code> and <code>propTypes</code> are really just properties on the constructor.</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kr">export</span> <span class="kr">class</span> <span class="nx">Counter</span> <span class="kr">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
|
||
<span class="nx">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
|
||
<span class="kr">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">state</span> <span class="o">=</span> <span class="p">{</span><span class="nx">count</span><span class="o">:</span> <span class="nx">props</span><span class="p">.</span><span class="nx">initialCount</span><span class="p">};</span>
|
||
<span class="p">}</span>
|
||
<span class="nx">tick</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span><span class="nx">count</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">});</span>
|
||
<span class="p">}</span>
|
||
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">return</span> <span class="p">(</span>
|
||
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">onClick</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">tick</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="k">this</span><span class="p">)}</span><span class="o">&gt;</span>
|
||
<span class="nx">Clicks</span><span class="o">:</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">count</span><span class="p">}</span>
|
||
<span class="o">&lt;</span><span class="err">/div&gt;</span>
|
||
<span class="p">);</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
<span class="nx">Counter</span><span class="p">.</span><span class="nx">propTypes</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">initialCount</span><span class="o">:</span> <span class="nx">React</span><span class="p">.</span><span class="nx">PropTypes</span><span class="p">.</span><span class="nx">number</span> <span class="p">};</span>
|
||
<span class="nx">Counter</span><span class="p">.</span><span class="nx">defaultProps</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">initialCount</span><span class="o">:</span> <span class="mi">0</span> <span class="p">};</span>
|
||
</code></pre></div><h3><a class="anchor" name="es7-property-initializers"></a>ES7+ Property Initializers <a class="hash-link" href="#es7-property-initializers">#</a></h3>
|
||
<p>Wait, assigning to properties seems like a very imperative way of defining classes! You&#39;re right, however, we designed it this way because it&#39;s idiomatic. We fully expect a more declarative syntax for property initialization to arrive in future version of JavaScript. It might look something like this:</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="c1">// Future Version</span>
|
||
<span class="kr">export</span> <span class="kr">class</span> <span class="nx">Counter</span> <span class="kr">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
|
||
<span class="kr">static</span> <span class="nx">propTypes</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">initialCount</span><span class="o">:</span> <span class="nx">React</span><span class="p">.</span><span class="nx">PropTypes</span><span class="p">.</span><span class="nx">number</span> <span class="p">};</span>
|
||
<span class="kr">static</span> <span class="nx">defaultProps</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">initialCount</span><span class="o">:</span> <span class="mi">0</span> <span class="p">};</span>
|
||
<span class="nx">state</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">count</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">initialCount</span> <span class="p">};</span>
|
||
<span class="nx">tick</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="nx">count</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">count</span> <span class="o">+</span> <span class="mi">1</span> <span class="p">});</span>
|
||
<span class="p">}</span>
|
||
<span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">return</span> <span class="p">(</span>
|
||
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">onClick</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">tick</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="k">this</span><span class="p">)}</span><span class="o">&gt;</span>
|
||
<span class="nx">Clicks</span><span class="o">:</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">count</span><span class="p">}</span>
|
||
<span class="o">&lt;</span><span class="err">/div&gt;</span>
|
||
<span class="p">);</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
</code></pre></div>
|
||
<p>This was inspired by TypeScript&#39;s property initializers.</p>
|
||
<h3><a class="anchor" name="autobinding"></a>Autobinding <a class="hash-link" href="#autobinding">#</a></h3>
|
||
<p><code>React.createClass</code> has a built-in magic feature that bound all methods to <code>this</code> automatically for you. This can be a little confusing for JavaScript developers that are not used to this feature in other classes, or it can be confusing when they move from React to other classes.</p>
|
||
|
||
<p>Therefore we decided not to have this built-in into React&#39;s class model. You can still explicitly prebind methods in your constructor if you want.</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kr">class</span> <span class="nx">Counter</span> <span class="kr">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
|
||
<span class="nx">constructor</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="kr">super</span><span class="p">();</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">tick</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">tick</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
|
||
<span class="p">}</span>
|
||
<span class="nx">tick</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="p">...</span>
|
||
<span class="p">}</span>
|
||
<span class="p">...</span>
|
||
<span class="p">}</span>
|
||
</code></pre></div>
|
||
<p>However, when we have the future property initializers, there is a neat trick that you can use to accomplish this syntactically:</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kr">class</span> <span class="nx">Counter</span> <span class="kr">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span> <span class="p">{</span>
|
||
<span class="nx">tick</span> <span class="o">=</span> <span class="p">()</span> <span class="o">=&gt;</span> <span class="p">{</span>
|
||
<span class="p">...</span>
|
||
<span class="p">}</span>
|
||
<span class="p">...</span>
|
||
<span class="p">}</span>
|
||
</code></pre></div><h3><a class="anchor" name="mixins"></a>Mixins <a class="hash-link" href="#mixins">#</a></h3>
|
||
<p>Unfortunately, we will not launch any mixin support for ES6 classes in React. That would defeat the purpose of only using idiomatic JavaScript concepts.</p>
|
||
|
||
<p>There is no standard and universal way to define mixins in JavaScript. In fact, several features to support mixins were dropped from ES6 today. There are a lot of libraries with different semantics. We think that there should be one way of defining mixins that you can use for any JavaScript class. React just making another doesn&#39;t help that effort.</p>
|
||
|
||
<p>Therefore, we will keep working with the larger JS community to create a standard for mixins. We will also start designing a new compositional API that will help make common tasks easier to do without mixins. E.g. first-class subscriptions to any kind of Flux store.</p>
|
||
|
||
<p>Luckily, if you want to keep using mixins, you can just keep using <code>React.createClass</code>.</p>
|
||
|
||
<blockquote>
|
||
<p><strong>Note:</strong></p>
|
||
|
||
<p>The classic <code>React.createClass</code> style of creating classes will continue to work just fine.</p>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="other-languages"></a>Other Languages! <a class="hash-link" href="#other-languages">#</a></h2>
|
||
<p>Since these classes are just plain old JavaScript classes, you can use other languages that compile to JavaScript classes, such as TypeScript.</p>
|
||
|
||
<p>You can also use CoffeeScript classes:</p>
|
||
<div class="highlight"><pre><code class="language-coffeescript" data-lang="coffeescript"><span class="nv">div = </span><span class="nx">React</span><span class="p">.</span><span class="nx">createFactory</span> <span class="s">&#39;div&#39;</span>
|
||
|
||
<span class="k">class</span> <span class="nx">Counter</span> <span class="k">extends</span> <span class="nx">React</span><span class="p">.</span><span class="nx">Component</span>
|
||
<span class="vi">@propTypes =</span>
|
||
<span class="nv">initialCount: </span><span class="nx">React</span><span class="p">.</span><span class="nx">PropTypes</span><span class="p">.</span><span class="nx">number</span>
|
||
<span class="vi">@defaultProps =</span>
|
||
<span class="nv">initialCount: </span><span class="mi">0</span>
|
||
<span class="nv">constructor: </span><span class="nf">-&gt;</span>
|
||
<span class="vi">@state =</span>
|
||
<span class="nv">count: </span><span class="nx">@props</span><span class="p">.</span><span class="nx">initialCount</span>
|
||
<span class="nv">tick: </span><span class="nf">=&gt;</span>
|
||
<span class="nx">@setState</span> <span class="nv">count: </span><span class="nx">@state</span><span class="p">.</span><span class="nx">count</span> <span class="o">+</span> <span class="mi">1</span>
|
||
<span class="nv">render: </span><span class="nf">-&gt;</span>
|
||
<span class="nx">div</span><span class="p">(</span><span class="nv">onClick: </span><span class="nx">@tick</span><span class="p">,</span> <span class="s">&#39;Clicks: &#39;</span><span class="p">,</span> <span class="nx">@state</span><span class="p">.</span><span class="nx">count</span><span class="p">)</span>
|
||
</code></pre></div>
|
||
<p>You can even use the old ES3 module pattern if you want:</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kd">function</span> <span class="nx">MyComponent</span><span class="p">(</span><span class="nx">initialProps</span><span class="p">)</span> <span class="p">{</span>
|
||
<span class="k">return</span> <span class="p">{</span>
|
||
<span class="nx">state</span><span class="o">:</span> <span class="p">{</span> <span class="nx">value</span><span class="o">:</span> <span class="nx">initialProps</span><span class="p">.</span><span class="nx">initialValue</span> <span class="p">},</span>
|
||
<span class="nx">render</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">return</span> <span class="o">&lt;</span><span class="nx">span</span> <span class="nx">className</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">value</span><span class="p">}</span> <span class="o">/&gt;</span>
|
||
<span class="p">}</span>
|
||
<span class="p">};</span>
|
||
<span class="p">}</span>
|
||
</code></pre></div></description>
|
||
<pubDate>2015-01-27T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React.js Conf Diversity Scholarship</title>
|
||
<description><p>Today I&#39;m really happy to announce the React.js Conf Diversity Scholarship! We believe that a diverse set of viewpoints and opinions is really important to build a thriving community. In an ideal world, every part of the tech community would be made up of people from all walks of life. However the reality is that we must be proactive and make an effort to make sure everybody has a voice. As conference organizers we worked closely with the Diversity Team here at Facebook to set aside 10 tickets and provide a scholarship. 10 tickets may not be many in the grand scheme but we really believe that this will have a positive impact on the discussions we have at the conference.</p>
|
||
|
||
<p>I&#39;m really excited about this and I hope you are too! The full announcement is below:</p>
|
||
|
||
<hr>
|
||
|
||
<p>The Diversity Team at Facebook is excited to announce that we are now accepting applications for the React.js Conf scholarship!</p>
|
||
|
||
<p>Beginning today, those studying or working in computer science or a related field can apply for an all-expense paid scholarship to attend the React.js Conf at Facebook’s Headquarters in Menlo Park, CA on January 28 &amp; 29, 2015. React opens a world of new possibilities such as server-side rendering, real-time updates, different rendering targets like SVG and canvas. Join us at React.js Conf to shape the future of client-side applications! For more information about the React.js conference, please see the <a href="http://conf.reactjs.com/">website</a> and <a href="http://facebook.github.io/react/blog/2014/10/27/react-js-conf.html">previous</a> <a href="http://facebook.github.io/react/blog/2014/11/24/react-js-conf-updates.html">updates</a> on our blog.</p>
|
||
|
||
<p>At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply.
|
||
Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws.</p>
|
||
|
||
<p>To apply for the scholarship, please visit the Application Page: <a href="https://www.surveymonkey.com/s/XVJGK6R">https://www.surveymonkey.com/s/XVJGK6R</a></p>
|
||
<h2><a class="anchor" name="award-includes"></a>Award Includes <a class="hash-link" href="#award-includes">#</a></h2>
|
||
<ul>
|
||
<li>Paid registration fee for the React.js Conf January 28 &amp; 29th at Facebook’s Headquarters in Menlo Park, CA</li>
|
||
<li>Paid travel and lodging expenses</li>
|
||
<li>Additional $200 meal stipend</li>
|
||
</ul>
|
||
<h2><a class="anchor" name="important-dates"></a>Important Dates <a class="hash-link" href="#important-dates">#</a></h2>
|
||
<ul>
|
||
<li>Monday, January 5, 2015: Applications for the React.js Conf Scholarship must be submitted in full</li>
|
||
<li>Friday, January 9, 2015: Award recipients will be notified by email of their acceptance</li>
|
||
<li>Wednesday &amp; Thursday, January 28 &amp; 29, 2015: React.js Conf</li>
|
||
</ul>
|
||
<h2><a class="anchor" name="eligibility"></a>Eligibility <a class="hash-link" href="#eligibility">#</a></h2>
|
||
<ul>
|
||
<li>Must currently be studying or working in Computer Science or a related field</li>
|
||
<li>International applicants are welcome, but you will be responsible for securing your own visa to attend the conference</li>
|
||
<li>You must be available to attend the full duration of React.js conf on January 28 and 29 at Facebook Headquarters in Menlo Park</li>
|
||
</ul>
|
||
</description>
|
||
<pubDate>2014-12-19T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/12/19/react-js-conf-diversity-scholarship.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/12/19/react-js-conf-diversity-scholarship.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React v0.12.2</title>
|
||
<description><p>We just shipped React v0.12.2, bringing the 0.12 branch up to date with a few small fixes that landed in master over the past 2 months.</p>
|
||
|
||
<p>You may have noticed that we did not do an announcement for v0.12.1. That release was snuck out in anticipation of <a href="http://flowtype.org/">Flow</a>, with only transform-related changes. Namely we added a flag to the <code>jsx</code> executable which allowed you to safely transform Flow-based code to vanilla JS. If you didn&#39;t update for that release, you can safely skip it and move directly to v0.12.2.</p>
|
||
|
||
<p>The release is available for download from the CDN:</p>
|
||
|
||
<ul>
|
||
<li><strong>React</strong><br>
|
||
Dev build with warnings: <a href="http://fb.me/react-0.12.2.js">http://fb.me/react-0.12.2.js</a><br>
|
||
Minified build for production: <a href="http://fb.me/react-0.12.2.min.js">http://fb.me/react-0.12.2.min.js</a><br></li>
|
||
<li><strong>React with Add-Ons</strong><br>
|
||
Dev build with warnings: <a href="http://fb.me/react-with-addons-0.12.2.js">http://fb.me/react-with-addons-0.12.2.js</a><br>
|
||
Minified build for production: <a href="http://fb.me/react-with-addons-0.12.2.min.js">http://fb.me/react-with-addons-0.12.2.min.js</a><br></li>
|
||
<li><strong>In-Browser JSX transformer</strong><br>
|
||
<a href="http://fb.me/JSXTransformer-0.12.2.js">http://fb.me/JSXTransformer-0.12.2.js</a></li>
|
||
</ul>
|
||
|
||
<p>We&#39;ve also published version <code>0.12.2</code> of the <code>react</code> and <code>react-tools</code> packages on npm and the <code>react</code> package on bower. <code>0.12.1</code> is also available in the same locations if need those.</p>
|
||
|
||
<p>Please try these builds out and <a href="https://github.com/facebook/react/issues/new">file an issue on GitHub</a> if you see anything awry.</p>
|
||
<h2><a class="anchor" name="changelog"></a>Changelog <a class="hash-link" href="#changelog">#</a></h2><h3><a class="anchor" name="react-core"></a>React Core <a class="hash-link" href="#react-core">#</a></h3>
|
||
<ul>
|
||
<li>Added support for more HTML attributes: <code>formAction</code>, <code>formEncType</code>, <code>formMethod</code>, <code>formTarget</code>, <code>marginHeight</code>, <code>marginWidth</code></li>
|
||
<li>Added <code>strokeOpacity</code> to the list of unitless CSS properties</li>
|
||
<li>Removed trailing commas (allows npm module to be bundled and used in IE8)</li>
|
||
<li>Fixed bug resulting in error when passing <code>undefined</code> to <code>React.createElement</code> - now there is a useful warning</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="react-tools"></a>React Tools <a class="hash-link" href="#react-tools">#</a></h3>
|
||
<ul>
|
||
<li>JSX-related transforms now always use double quotes for props and <code>displayName</code></li>
|
||
</ul>
|
||
</description>
|
||
<pubDate>2014-12-18T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/12/18/react-v0.12.2.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/12/18/react-v0.12.2.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Community Round-up #24</title>
|
||
<description><h2><a class="anchor" name="keep-it-simple"></a>Keep it Simple <a class="hash-link" href="#keep-it-simple">#</a></h2>
|
||
<p>Pedro Nauck (<a href="https://github.com/pedronauck">pedronauck</a>) delivered an impeccably illustrated deck at Brazil&#39;s <em>Front in Floripa</em> conference. Watch him talk about how to keep delivering value as your app scales, by keeping your development process simple.</p>
|
||
|
||
<script async class="speakerdeck-embed" data-id="44129b9054c901328b89221e99b278fe" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
|
||
|
||
<p>Murilo Pereira (<a href="https://github.com/mpereira">mpereira</a>) tussles with the topic of complexity in this blog post about <a href="http://www.techsonian.net/2014/09/from-backbone-to-react-our-experience-scaling-a-web-application/">coping with scaling up</a>, where he describes how his team used React to make possible the “nearly impossible.”</p>
|
||
|
||
<p>I (<a href="https://github.com/steveluscher">steveluscher</a>) spoke at Manning Publications&#39; “Powered By JavaScript” Strangeloop pre-conf in St. Louis. There, I proposed a new notation to talk about development complexity – Big-Coffee Notation ☕(n) – and spoke about the features of React that help keep our Big-Coffee from going quadratic, as our user interfaces get more complex.</p>
|
||
|
||
<iframe width="560" height="315" src="//www.youtube.com/embed/rI0GQc__0SM" frameborder="0" allowfullscreen></iframe>
|
||
|
||
<p>James Pearce (<a href="https://github.com/jamesgpearce">jamesgpearce</a>) carried Big-Coffee all the way to Raleigh, NC. At the <em>All Things Open</em> conference, he spoke about some of the design decisions that went into React, particularly those that lend themselves to simpler, more reliable code.</p>
|
||
|
||
<iframe width="560" height="315" src="//www.youtube.com/embed/m2fuO2wl_3c" frameborder="0" allowfullscreen></iframe>
|
||
<h2><a class="anchor" name="all-about-isomorphism"></a>All About Isomorphism <a class="hash-link" href="#all-about-isomorphism">#</a></h2>
|
||
<p>Michael Ridgway (<a href="https://github.com/mridgway">mridgway</a>) shows us how Yahoo! (who recently <a href="http://www.slideshare.net/rmsguhan/react-meetup-mailonreact">moved Yahoo! Mail to React</a>) renders their React+Flux application, server-side.</p>
|
||
|
||
<script async class="speakerdeck-embed" data-id="87ecaa3048750132f42542ffc18c6fcf" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>
|
||
|
||
<p>Péter Márton (<a href="https://github.com/hekike">hekike</a>) helps us brew a cold one (literally) using an application that&#39;s server-client <a href="http://blog.risingstack.com/from-angularjs-to-react-the-isomorphic-way/">isomorphic and indexable</a>. Demo and sample code included – cold ones sold separately.</p>
|
||
|
||
<p>And, lest you think that client-server isomorphism exists in pursuit of crawalable, indexable HTML alone, watch as Nate Hunzaker (<a href="https://github.com/nhunzaker">nhunzaker</a>) <a href="http://viget.com/extend/visualization-is-for-sharing-using-react-for-portable-data-visualization">server renders data visualizations as SVG</a> with React.</p>
|
||
<h2><a class="anchor" name="react-router-mows-the-lawn"></a>React Router Mows the Lawn <a class="hash-link" href="#react-router-mows-the-lawn">#</a></h2>
|
||
<p>Ryan Florence (<a href="https://github.com/rpflorence%5D">rpflorence</a>) and Michael Jackson (<a href="https://github.com/mjackson">mjackson</a>) unveiled a new API for <a href="https://github.com/rackt/react-router">React Router</a> that solves some of its user&#39;s problems by eliminating the problems themselves. Read all about what React Router learned from its community of users, and how they&#39;ve <a href="https://github.com/rackt/react-router/wiki/Announcements">rolled your ideas into their latest release</a>.</p>
|
||
<h2><a class="anchor" name="react-in-practice"></a>React in Practice <a class="hash-link" href="#react-in-practice">#</a></h2>
|
||
<p>Jonathan Beebe (<a href="https://github.com/somethingkindawierd">somethingkindawierd</a>) spoke about how he uses React to build tools that deliver hope to those trying to make the best of a bad situation. Watch his talk from this year&#39;s <em>Nodevember</em> conference in Nashville</p>
|
||
|
||
<iframe width="420" height="315" src="//www.youtube.com/embed/uZgAq1CZ1N8" frameborder="0" allowfullscreen></iframe>
|
||
|
||
<p>If you take a peek under the covers, you&#39;ll find that React powers <a href="https://blog.carousel.com/2014/11/introducing-carousel-for-web-ipad-and-android-tablet/">Carousel</a>, Dropbox&#39;s new photo and video gallery app.</p>
|
||
|
||
<p>We enjoyed a cinematic/narrative experience with this React-powered, interactive story by British author William Boyd. Dive into “<a href="https://thevanishinggame.wellstoried.com">The Vanishing Game</a>” and see for yourself.</p>
|
||
<h2><a class="anchor" name="be-kind-rewind"></a>Be Kind, Rewind <a class="hash-link" href="#be-kind-rewind">#</a></h2>
|
||
<p>Spend the next 60 seconds watching Daniel Woelfel (<a href="https://github.com/dwwoelfel">dwwoelfel</a>) serialize a React app&#39;s state as a string, then deserialize it to produce a working UI. Read about how he uses this technique to <a href="http://blog.circleci.com/local-state-global-concerns/">reproduce bugs</a> reported to him by his users.</p>
|
||
|
||
<iframe width="420" height="315" src="//www.youtube.com/embed/5yHFTN-_mOo" frameborder="0" allowfullscreen></iframe>
|
||
<h2><a class="anchor" name="community-components"></a>Community Components <a class="hash-link" href="#community-components">#</a></h2>
|
||
<p>Tom Chen (<a href="https://github.com/tomchentw">tomchentw</a>) brings us a <a href="http://tomchentw.github.io/react-google-maps/">react-google-maps</a> component, and a way to syntax highlight source code using Prism and the <a href="http://tomchentw.github.io/react-prism/">react-prism</a> component, for good measure.</p>
|
||
|
||
<p>Jed Watson (<a href="https://github.com/JedWatson">jedwatson</a>) helps you manage touch, tap, and press events using the <a href="https://github.com/JedWatson/react-tappable">react-tappable</a> component.</p>
|
||
|
||
<p>To find these, and more community-built components, consult the <a href="http://react-components.com/">React Components</a> and <a href="http://react.rocks">React Rocks</a> component directories. React Rocks recently exceeded one-hundred listed components and counting. See one missing? Add the keyword <code>react-component</code> to your <code>package.json</code> to get listed on React Components, and <a href="https://docs.google.com/forms/d/1TpnwJmLcmmGj-_TI68upu_bKBViYeiKx7Aj9uKmV6wY/viewform">submit a link to React Rocks</a>.</p>
|
||
<h2><a class="anchor" name="waiter-theres-a-css-in-my-javascript"></a>Waiter, There&#39;s a CSS In My JavaScript <a class="hash-link" href="#waiter-theres-a-css-in-my-javascript">#</a></h2>
|
||
<p>The internet is abuzz with talk of styling React components using JavaScript instead of CSS. Christopher Chedeau (<a href="https://github.com/vjeux">vjeux</a>) talks about some of the <a href="https://speakerdeck.com/vjeux/react-css-in-js">fundamental style management challenges</a> we grapple with, at Facebook scale. A number of implementations of JavaScript centric style management solutions have appeared in the wild, including the React-focused <a href="https://github.com/js-next/react-style">react-style</a>.</p>
|
||
<h2><a class="anchor" name="test-isolation"></a>Test Isolation <a class="hash-link" href="#test-isolation">#</a></h2>
|
||
<p>Yahoo! shows us how they make use of <code>iframe</code> elements to <a href="http://yahooeng.tumblr.com/post/102274727496/to-testutil-or-not-to-testutil">unit test React components in isolation</a>.</p>
|
||
<h2><a class="anchor" name="youve-got-the-hang-of-flux-now-lets-flow"></a>You&#39;ve Got The Hang of Flux, Now Let&#39;s Flow <a class="hash-link" href="#youve-got-the-hang-of-flux-now-lets-flow">#</a></h2>
|
||
<p>Facebook Open Source released <a href="https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/">Flow</a> this month – a static type checker for JavaScript. Naturally, Flow supports JSX, and you can use it to <a href="https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/#compatibility">type check React applications</a>. There&#39;s never been a better reason to start making use of <code>propTypes</code> in your component specifications!</p>
|
||
<h2><a class="anchor" name="countdown-to-react.js-conf-2014"></a>Countdown to React.js Conf 2014 <a class="hash-link" href="#countdown-to-react.js-conf-2014">#</a></h2>
|
||
<p>We&#39;re counting down the days until <a href="http://conf.reactjs.com">React.js Conf</a> at Facebook&#39;s headquarters in Menlo Park, California, on January 28th &amp; 29th, 2015. Thank you, to everyone who responded to the Call for Presenters. Mark the dates; tickets go on sale in three waves: at noon PST on November 28th, December 5th, and December 12th, 2014.</p>
|
||
<h2><a class="anchor" name="react-meetups-around-the-world"></a>React Meetups Around the World <a class="hash-link" href="#react-meetups-around-the-world">#</a></h2>
|
||
<blockquote class="twitter-tweet" lang="en"><p>React JS meetup having pretty good turn up rate today <a href="https://twitter.com/hashtag/londonreact?src=hash">#londonreact</a> <a href="http://t.co/c360dlVVAe">pic.twitter.com/c360dlVVAe</a></p>&mdash; Alexander Savin (@karismafilms) <a href="https://twitter.com/karismafilms/status/535152580377468928">November 19, 2014</a></blockquote>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" lang="en"><p>60+ attendees at the second React.js Utah meetup. <a href="https://twitter.com/ryanflorence">@ryanflorence</a> doing a great job, even without the internet. <a href="http://t.co/fV59AQTOyu">pic.twitter.com/fV59AQTOyu</a></p>&mdash; ReactJS Utah (@reactjsutah) <a href="https://twitter.com/reactjsutah/status/527259410020573184">October 29, 2014</a></blockquote>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/hashtag/ReactJS?src=hash">#ReactJS</a> meetup at <a href="https://twitter.com/Yahoo">@Yahoo</a> ! History of <a href="https://twitter.com/yahoomail">@yahoomail</a> and why we chose react and NodeJS <a href="http://t.co/Nm4EdTv45G">pic.twitter.com/Nm4EdTv45G</a></p>&mdash; rmsguhan (@rmsguhan) <a href="https://twitter.com/rmsguhan/status/515370950427029504">September 26, 2014</a></blockquote>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="skinny-row">
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" data-cards="hidden" lang="en"><p>The very first ReactJS meetup in NYC tonight, I&#39;ll be speaking about the big ideas behind Om <a href="http://t.co/dvPrFqE9eP">http://t.co/dvPrFqE9eP</a></p>&mdash; David Nolen (@swannodette) <a href="https://twitter.com/swannodette/status/532190993463128064">November 11, 2014</a></blockquote>
|
||
</div>
|
||
<div class="skinny-col">
|
||
<blockquote class="twitter-tweet" lang="en"><p>If anyone in Sydney is curious about <a href="https://twitter.com/reactjs">@reactjs</a>, I&#39;m presenting at <a href="https://twitter.com/sydjs">@sydjs</a> tonight on how to use it and why it is the future. <a href="https://twitter.com/hashtag/javascript?src=hash">#javascript</a></p>&mdash; Jed Watson (@JedWatson) <a href="https://twitter.com/JedWatson/status/534943557568565248">November 19, 2014</a></blockquote>
|
||
</div>
|
||
</div>
|
||
|
||
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||
</description>
|
||
<pubDate>2014-11-25T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/11/25/community-roundup-24.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/11/25/community-roundup-24.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React.js Conf Updates</title>
|
||
<description><p>Yesterday was the <a href="http://conf.reactjs.com/index.html">React.js Conf</a> call for presenters submission deadline. We were
|
||
surprised to have received a total of <strong>one hundred talk proposals</strong> and were
|
||
amazed that 600 people requested to be notified when ticket go on sale. This is incredible!</p>
|
||
|
||
<p>When we organized the conference, we decided to start small since this is the
|
||
first React.js conference. Also, we weren&#39;t sure what level of demand to expect,
|
||
so we planned for a single-track, two-day conference on Facebook&#39;s campus. The
|
||
largest room available would accomodate 18 speaking slots and 200 attendees.
|
||
The spacial configuration makes it difficult to add a second track and changing
|
||
venues only two months in advance would be too difficult, so we are deciding to
|
||
stick with the originally planned format and venue on Facebook&#39;s campus.</p>
|
||
|
||
<p>Unfortunately, this means that we can only accept a small number of the awesome
|
||
conference talk proposals. In order to make sure attendees get a fair shot at
|
||
registering, we&#39;re going to to sell tickets in three separate first-come,
|
||
first-serve phases. <strong>Tickets will cost $200 regardless of which phase they are
|
||
purchased from and all proceeds will go to charity</strong>.</p>
|
||
|
||
<ul>
|
||
<li>Friday November 28th 2014 — Noon PST: First wave of tickets</li>
|
||
<li>Friday December 5th 2014 — Noon PST: Second wave of tickets</li>
|
||
<li>Friday December 12th 2014 — Noon PST: Third and last wave of tickets</li>
|
||
</ul>
|
||
|
||
<p>We really do wish that everyone could attend React.js Conf, but in order to
|
||
ensure a quality experience for those who attend, we feel it will be best to
|
||
limit the size of the conference to what was originally planned for. This means
|
||
that not everyone who wants to attend will be able to, and many talks that
|
||
would be excellent contributions to the conference will have to be postponed
|
||
until the next conference. All the talks will be recorded and put online shortly after.</p>
|
||
|
||
<p>We hope to see many of you at React.js Conf this January.</p>
|
||
|
||
<p>Sincerely,</p>
|
||
|
||
<p>React Core Team</p>
|
||
</description>
|
||
<pubDate>2014-11-24T00:00:00-08:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/11/24/react-js-conf-updates.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/11/24/react-js-conf-updates.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React v0.12</title>
|
||
<description><p>We&#39;re happy to announce the availability of React v0.12! After over a week of baking as the release candidate, we uncovered and fixed a few small issues. Thanks to all of you who upgraded and gave us feedback!</p>
|
||
|
||
<p>We have talked a lot about some of the bigger changes in this release. <a href="/react/blog/2014/10/14/introducing-react-elements.html">We introduced new terminology</a> and changed APIs to clean up and simplify some of the concepts of React. <a href="/react/blog/2014/10/16/react-v0.12-rc1.html">We also made several changes to JSX</a> and deprecated a few functions. We won&#39;t go into depth about these changes again but we encourage you to read up on these changes in the linked posts. We&#39;ll summarize these changes and discuss some of the other changes and how they may impact you below. As always, a full changelog is also included below.</p>
|
||
|
||
<p>The release is available for download:</p>
|
||
|
||
<ul>
|
||
<li><strong>React</strong><br>
|
||
Dev build with warnings: <a href="http://fb.me/react-0.12.0.js">http://fb.me/react-0.12.0.js</a><br>
|
||
Minified build for production: <a href="http://fb.me/react-0.12.0.min.js">http://fb.me/react-0.12.0.min.js</a><br></li>
|
||
<li><strong>React with Add-Ons</strong><br>
|
||
Dev build with warnings: <a href="http://fb.me/react-with-addons-0.12.0.js">http://fb.me/react-with-addons-0.12.0.js</a><br>
|
||
Minified build for production: <a href="http://fb.me/react-with-addons-0.12.0.min.js">http://fb.me/react-with-addons-0.12.0.min.js</a><br></li>
|
||
<li><strong>In-Browser JSX transformer</strong><br>
|
||
<a href="http://fb.me/JSXTransformer-0.12.0.js">http://fb.me/JSXTransformer-0.12.0.js</a></li>
|
||
</ul>
|
||
|
||
<p>We&#39;ve also published version <code>0.12.0</code> of the <code>react</code> and <code>react-tools</code> packages on npm and the <code>react</code> package on bower.</p>
|
||
<h2><a class="anchor" name="new-terminology-amp-updated-apis"></a>New Terminology &amp; Updated APIs <a class="hash-link" href="#new-terminology-amp-updated-apis">#</a></h2>
|
||
<p>v0.12 is bringing about some new terminology. <a href="/react/blog/2014/10/14/introducing-react-elements.html">We introduced</a> this 2 weeks ago and we&#39;ve also documented it in <a href="/react/docs/glossary.html">a new section of the documentation</a>. As a part of this, we also corrected many of our top-level APIs to align with the terminology. <code>Component</code> has been removed from all of our <code>React.render*</code> methods. While at one point the argument you passed to these functions was called a Component, it no longer is. You are passing ReactElements. To align with <code>render</code> methods in your component classes, we decided to keep the top-level functions short and sweet. <code>React.renderComponent</code> is now <code>React.render</code>.</p>
|
||
|
||
<p>We also corrected some other misnomers. <code>React.isValidComponent</code> actually determines if the argument is a ReactElement, so it has been renamed to <code>React.isValidElement</code>. In the same vein, <code>React.PropTypes.component</code> is now <code>React.PropTypes.element</code> and <code>React.PropTypes.renderable</code> is now <code>React.PropTypes.node</code>.</p>
|
||
|
||
<p>The old methods will still work but will warn upon first use. They will be removed in v0.13.</p>
|
||
<h2><a class="anchor" name="jsx-changes"></a>JSX Changes <a class="hash-link" href="#jsx-changes">#</a></h2>
|
||
<p><a href="/react/blog/2014/10/16/react-v0.12-rc1.html#jsx-changes">We talked more in depth about these before</a>, so here are the highlights.</p>
|
||
|
||
<ul>
|
||
<li>No more <code>/** @jsx React.DOM */</code>!</li>
|
||
<li>We no longer transform to a straight function call. <code>&lt;Component/&gt;</code> now becomes <code>React.createElement(Component)</code></li>
|
||
<li>DOM components don&#39;t make use of <code>React.DOM</code>, instead we pass the tag name directly. <code>&lt;div/&gt;</code> becomes <code>React.createElement(&#39;div&#39;)</code></li>
|
||
<li>We introduced spread attributes as a quick way to transfer props.</li>
|
||
</ul>
|
||
<h2><a class="anchor" name="devtools-improvements-no-more-__internals"></a>DevTools Improvements, No More <code>__internals</code> <a class="hash-link" href="#devtools-improvements-no-more-__internals">#</a></h2>
|
||
<p>For months we&#39;ve gotten complaints about the React DevTools message. It shouldn&#39;t have logged the up-sell message when you were already using the DevTools. Unfortunately this was because the way we implemented these tools resulted in the DevTools knowing about React, but not the reverse. We finally gave this some attention and enabled React to know if the DevTools are installed. We released an update to the devtools several weeks ago making this possible. Extensions in Chrome should auto-update so you probably already have the update installed!</p>
|
||
|
||
<p>As a result of this update, we no longer need to expose several internal modules to the world. If you were taking advantage of this implementation detail, your code will break. <code>React.__internals</code> is no more.</p>
|
||
<h2><a class="anchor" name="license-change---bsd"></a>License Change - BSD <a class="hash-link" href="#license-change---bsd">#</a></h2>
|
||
<p>We updated the license on React to the BSD 3-Clause license with an explicit patent grant. Previously we used the Apache 2 license. These licenses are very similar and our extra patent grant is equivalent to the grant provided in the Apache license. You can still use React with the confidence that we have granted the use of any patents covering it. This brings us in line with the same licensing we use across the majority of our open source projects at Facebook.</p>
|
||
|
||
<p>You can read the full text of the <a href="https://github.com/facebook/react/blob/master/LICENSE">LICENSE</a> and <a href="https://github.com/facebook/react/blob/master/PATENTS"><code>PATENTS</code></a> files on GitHub.</p>
|
||
|
||
<hr>
|
||
<h2><a class="anchor" name="changelog"></a>Changelog <a class="hash-link" href="#changelog">#</a></h2><h3><a class="anchor" name="react-core"></a>React Core <a class="hash-link" href="#react-core">#</a></h3><h4><a class="anchor" name="breaking-changes"></a>Breaking Changes <a class="hash-link" href="#breaking-changes">#</a></h4>
|
||
<ul>
|
||
<li><code>key</code> and <code>ref</code> moved off props object, now accessible on the element directly</li>
|
||
<li>React is now BSD licensed with accompanying Patents grant</li>
|
||
<li>Default prop resolution has moved to Element creation time instead of mount time, making them effectively static</li>
|
||
<li><code>React.__internals</code> is removed - it was exposed for DevTools which no longer needs access</li>
|
||
<li>Composite Component functions can no longer be called directly - they must be wrapped with <code>React.createFactory</code> first. This is handled for you when using JSX.</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="new-features"></a>New Features <a class="hash-link" href="#new-features">#</a></h4>
|
||
<ul>
|
||
<li>Spread operator (<code>{...}</code>) introduced to deprecate <code>this.transferPropsTo</code></li>
|
||
<li>Added support for more HTML attributes: <code>acceptCharset</code>, <code>classID</code>, <code>manifest</code></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="deprecations"></a>Deprecations <a class="hash-link" href="#deprecations">#</a></h4>
|
||
<ul>
|
||
<li><code>React.renderComponent</code> --&gt; <code>React.render</code></li>
|
||
<li><code>React.renderComponentToString</code> --&gt; <code>React.renderToString</code></li>
|
||
<li><code>React.renderComponentToStaticMarkup</code> --&gt; <code>React.renderToStaticMarkup</code></li>
|
||
<li><code>React.isValidComponent</code> --&gt; <code>React.isValidElement</code></li>
|
||
<li><code>React.PropTypes.component</code> --&gt; <code>React.PropTypes.element</code></li>
|
||
<li><code>React.PropTypes.renderable</code> --&gt; <code>React.PropTypes.node</code></li>
|
||
<li><strong>DEPRECATED</strong> <code>React.isValidClass</code></li>
|
||
<li><strong>DEPRECATED</strong> <code>instance.transferPropsTo</code></li>
|
||
<li><strong>DEPRECATED</strong> Returning <code>false</code> from event handlers to preventDefault</li>
|
||
<li><strong>DEPRECATED</strong> Convenience Constructor usage as function, instead wrap with <code>React.createFactory</code></li>
|
||
<li><strong>DEPRECATED</strong> use of <code>key={null}</code> to assign implicit keys</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="bug-fixes"></a>Bug Fixes <a class="hash-link" href="#bug-fixes">#</a></h4>
|
||
<ul>
|
||
<li>Better handling of events and updates in nested results, fixing value restoration in &quot;layered&quot; controlled components</li>
|
||
<li>Correctly treat <code>event.getModifierState</code> as case sensitive</li>
|
||
<li>Improved normalization of <code>event.charCode</code></li>
|
||
<li>Better error stacks when involving autobound methods</li>
|
||
<li>Removed DevTools message when the DevTools are installed</li>
|
||
<li>Correctly detect required language features across browsers</li>
|
||
<li>Fixed support for some HTML attributes:
|
||
|
||
<ul>
|
||
<li><code>list</code> updates correctly now</li>
|
||
<li><code>scrollLeft</code>, <code>scrollTop</code> removed, these should not be specified as props</li>
|
||
</ul></li>
|
||
<li>Improved error messages</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="react-with-addons"></a>React With Addons <a class="hash-link" href="#react-with-addons">#</a></h3><h4><a class="anchor" name="new-features"></a>New Features <a class="hash-link" href="#new-features">#</a></h4>
|
||
<ul>
|
||
<li><code>React.addons.batchedUpdates</code> added to API for hooking into update cycle</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="breaking-changes"></a>Breaking Changes <a class="hash-link" href="#breaking-changes">#</a></h4>
|
||
<ul>
|
||
<li><code>React.addons.update</code> uses <code>assign</code> instead of <code>copyProperties</code> which does <code>hasOwnProperty</code> checks. Properties on prototypes will no longer be updated correctly.</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="bug-fixes"></a>Bug Fixes <a class="hash-link" href="#bug-fixes">#</a></h4>
|
||
<ul>
|
||
<li>Fixed some issues with CSS Transitions</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="jsx"></a>JSX <a class="hash-link" href="#jsx">#</a></h3><h4><a class="anchor" name="breaking-changes"></a>Breaking Changes <a class="hash-link" href="#breaking-changes">#</a></h4>
|
||
<ul>
|
||
<li>Enforced convention: lower case tag names are always treated as HTML tags, upper case tag names are always treated as composite components</li>
|
||
<li>JSX no longer transforms to simple function calls</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="new-features"></a>New Features <a class="hash-link" href="#new-features">#</a></h4>
|
||
<ul>
|
||
<li><code>@jsx React.DOM</code> no longer required</li>
|
||
<li>spread (<code>{...}</code>) operator introduced to allow easier use of props</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="bug-fixes"></a>Bug Fixes <a class="hash-link" href="#bug-fixes">#</a></h4>
|
||
<ul>
|
||
<li>JSXTransformer: Make sourcemaps an option when using APIs directly (eg, for react-rails)</li>
|
||
</ul>
|
||
</description>
|
||
<pubDate>2014-10-28T00:00:00-07:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/10/28/react-v0.12.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/10/28/react-v0.12.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>React.js Conf</title>
|
||
<description><p>Every few weeks someone asks us when we are going to organize a conference for React. Our answer has always been &quot;some day&quot;. In the mean time, people have been talking about React at other JavaScript conferences around the world. But now the time has finally come for us to have a conference of our own.</p>
|
||
|
||
<p><strong>We&#39;re happy to announce <a href="http://conf.reactjs.com/">React.js Conf</a>! It will take place January 28-29, 2015 on Facebook&#39;s campus in Menlo Park, California.</strong></p>
|
||
|
||
<p>Before we open registration, <a href="http://conf.reactjs.com/call-for-presenters.html">we&#39;re looking for great talks</a>. We want to see how you pushed application development forward! If you ever talked to a meet-up, pitched React to your co-workers, or done something awesome and want to talk about it, let us know!</p>
|
||
|
||
<p>Here are some areas of research we want to explore during the conference if you need some inspiration: server-side rendering, data fetching, language features (eg es6, clojure), immutability, rendering targets (eg svg, canvas), real-time updates...</p>
|
||
|
||
<p>We look forward to seeing many of you in person in just a few short months!</p>
|
||
</description>
|
||
<pubDate>2014-10-27T00:00:00-07:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/10/27/react-js-conf.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/10/27/react-js-conf.html</guid>
|
||
</item>
|
||
|
||
<item>
|
||
<title>Community Round-up #23</title>
|
||
<description><p>This round-up is a special edition on <a href="http://facebook.github.io/flux/">Flux</a>. If you expect to see diagrams showing arrows that all point in the same direction, you won&#39;t be disappointed!</p>
|
||
<h2><a class="anchor" name="react-and-flux-at-forwardjs"></a>React And Flux at ForwardJS <a class="hash-link" href="#react-and-flux-at-forwardjs">#</a></h2>
|
||
<p>Facebook engineers <a href="https://github.com/jingc">Jing Chen</a> and <a href="https://github.com/fisherwebdev">Bill Fisher</a> gave a talk about Flux and React at <a href="http://forwardjs.com/">ForwardJS</a>, and how using an application architecture with a unidirectional data flow helped solve recurring bugs.</p>
|
||
|
||
<iframe width="650" height="315" src="//www.youtube.com/embed/i__969noyAM" frameborder="0" allowfullscreen></iframe>
|
||
<h1><a class="anchor" name="yahoo"></a>Yahoo <a class="hash-link" href="#yahoo">#</a></h1>
|
||
<p>Yahoo is converting Yahoo Mail to React and Flux and in the process, they open sourced several components. This will help you get an isomorphic application up and running.</p>
|
||
|
||
<ul>
|
||
<li><a href="https://github.com/yahoo/flux-router-component">Flux Router Component</a></li>
|
||
<li><a href="https://github.com/yahoo/dispatchr">Dispatchr</a></li>
|
||
<li><a href="https://github.com/yahoo/fetchr">Fetchr</a></li>
|
||
<li><a href="https://github.com/yahoo/flux-examples">Flux Examples</a></li>
|
||
</ul>
|
||
<h2><a class="anchor" name="reflux"></a>Reflux <a class="hash-link" href="#reflux">#</a></h2>
|
||
<p><a href="http://spoike.ghost.io/">Mikael Brassman</a> wrote <a href="https://github.com/spoike/refluxjs">Reflux</a>, a library that implements Flux concepts. Note that it diverges significantly from the way we use Flux at Facebook. He explains <a href="http://spoike.ghost.io/deconstructing-reactjss-flux/">the reasons why in a blog post</a>.</p>
|
||
|
||
<p><center>
|
||
<a href="http://spoike.ghost.io/deconstructing-reactjss-flux/"><img src="/react/img/blog/reflux-flux.png" width="400" /></a>
|
||
</center></p>
|
||
<h2><a class="anchor" name="react-and-flux-interview"></a>React and Flux Interview <a class="hash-link" href="#react-and-flux-interview">#</a></h2>
|
||
<p><a href="http://ianobermiller.com/">Ian Obermiller</a>, engineer at Facebook, <a href="http://ianobermiller.com/blog/2014/09/15/react-and-flux-interview/">made a lengthy interview</a> on the experience of using React and Flux in order to build probably the biggest React application ever written so far.</p>
|
||
|
||
<blockquote>
|
||
<p>I’ve actually said this many times to my team too, I love React. It’s really great for making these complex applications. One thing that really surprised me with it is that React combined with a sane module system like CommonJS, and making sure that you actually modulize your stuff properly has scaled really well to a team of almost 10 developers working on hundreds of files and tens of thousands of lines of code.</p>
|
||
|
||
<p>Really, a fairly large code base... stuff just works. You don’t have to worry about mutating, and the state of the DOM just really makes stuff easy. Just conceptually it’s easier just to think about here’s what I have, here’s my data, here’s how it renders, I don’t care about anything else. For most cases that is really simplifying and makes it really fast to do stuff.</p>
|
||
|
||
<p><a href="http://ianobermiller.com/blog/2014/09/15/react-and-flux-interview/">Read the full interview...</a></p>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="adobes-brackets-project-tree"></a>Adobe&#39;s Brackets Project Tree <a class="hash-link" href="#adobes-brackets-project-tree">#</a></h2>
|
||
<p><a href="http://www.kevindangoor.com/">Kevin Dangoor</a> is converting the project tree of <a href="http://brackets.io/">Adobe&#39;s Bracket text editor</a> to React and Flux. He wrote about his experience <a href="http://www.kevindangoor.com/2014/09/intro-to-the-new-brackets-project-tree/">using Flux</a>.</p>
|
||
|
||
<p><center>
|
||
<a href="http://www.kevindangoor.com/2014/09/intro-to-the-new-brackets-project-tree/"><img src="/react/img/blog/flux-diagram.png" width="400" /></a>
|
||
</center></p>
|
||
<h2><a class="anchor" name="async-requests-with-flux-revisited"></a>Async Requests with Flux Revisited <a class="hash-link" href="#async-requests-with-flux-revisited">#</a></h2>
|
||
<p><a href="http://www.code-experience.com/the-code-experience/">Reto Schläpfer</a> came back to a Flux project he hasn&#39;t worked on for a month and <a href="http://www.code-experience.com/async-requests-with-react-js-and-flux-revisited/">saw many ways to improve the way he implemented Flux</a>. He summarized his learnings in a blog post.</p>
|
||
|
||
<blockquote>
|
||
<p>The smarter way is to call the Web Api directly from an Action Creator and then make the Api dispatch an event with the request result as a payload. The Store(s) can choose to listen on those request actions and change their state accordingly.</p>
|
||
|
||
<p>Before I show some updated code snippets, let me explain why this is superior:</p>
|
||
|
||
<ul>
|
||
<li><p>There should be only one channel for all state changes: The Dispatcher. This makes debugging easy because it just requires a single console.log in the dispatcher to observe every single state change trigger.</p></li>
|
||
<li><p>Asynchronously executed callbacks should not leak into Stores. The consequences of it are just too hard to fully foresee. This leads to elusive bugs. Stores should only execute synchronous code. Otherwise they are too hard to understand.</p></li>
|
||
<li><p>Avoiding actions firing other actions makes your app simple. We use the newest Dispatcher implementation from Facebook that does not allow a new dispatch while dispatching. It forces you to do things right.</p></li>
|
||
</ul>
|
||
|
||
<p><a href="http://www.code-experience.com/async-requests-with-react-js-and-flux-revisited/">Read the full article...</a></p>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="undo-redo-with-immutable-data-structures"></a>Undo-Redo with Immutable Data Structures <a class="hash-link" href="#undo-redo-with-immutable-data-structures">#</a></h2>
|
||
<p><a href="https://github.com/ameyakarve">Ameya Karve</a> explained how to use <a href="https://github.com/swannodette/mori">Mori</a>, a library that provides immutable data structures, in order to <a href="http://ameyakarve.com/jekyll/update/2014/02/06/Undo-React-Flux-Mori.html">implement undo-redo</a>. This usually very challenging feature only takes a few lines of code with Flux!</p>
|
||
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">undo</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">redoStates</span> <span class="o">=</span> <span class="nx">Mori</span><span class="p">.</span><span class="nx">conj</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">redoStates</span><span class="p">,</span> <span class="nx">Mori</span><span class="p">.</span><span class="nx">first</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span><span class="p">));</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span> <span class="o">=</span> <span class="nx">Mori</span><span class="p">.</span><span class="nx">drop</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span><span class="p">);</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">todosState</span> <span class="o">=</span> <span class="nx">Mori</span><span class="p">.</span><span class="nx">first</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span><span class="p">);</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">canUndo</span> <span class="o">=</span> <span class="nx">Mori</span><span class="p">.</span><span class="nx">count</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">;</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">canRedo</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
|
||
<span class="k">if</span> <span class="p">(</span><span class="nx">Mori</span><span class="p">.</span><span class="nx">count</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">undoStates</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">todos</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">todosState</span><span class="p">);</span>
|
||
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">todos</span> <span class="o">=</span> <span class="p">[];</span>
|
||
<span class="p">}</span>
|
||
<span class="k">this</span><span class="p">.</span><span class="nx">emit</span><span class="p">(</span><span class="s1">&#39;change&#39;</span><span class="p">);</span>
|
||
<span class="p">},</span>
|
||
</code></pre></div><h2><a class="anchor" name="flux-in-practice"></a>Flux in practice <a class="hash-link" href="#flux-in-practice">#</a></h2>
|
||
<p><a href="https://twitter.com/garychambers108">Gary Chambers</a> wrote a <a href="https://medium.com/@garychambers108/flux-in-practice-ec08daa9041a">guide to get started with Flux</a>. This is a very practical introduction to Flux.</p>
|
||
|
||
<blockquote>
|
||
<p>So, what does it actually mean to write an application in the Flux way? At that moment of inspiration, when faced with an empty text editor, how should you begin? This post follows the process of building a Flux-compliant application from scratch.</p>
|
||
|
||
<p><a href="https://medium.com/@garychambers108/flux-in-practice-ec08daa9041a">Read the full guide...</a></p>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="components-react-and-flux"></a>Components, React and Flux <a class="hash-link" href="#components-react-and-flux">#</a></h2>
|
||
<p><a href="https://twitter.com/dan_abramov">Dan Abramov</a> working at Stampsy made a talk about React and Flux. It&#39;s a very good overview of the concepts at play.</p>
|
||
|
||
<iframe src="//slides.com/danabramov/components-react-flux-wip/embed" width="650" height="315" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||
<h2><a class="anchor" name="react-and-flux"></a>React and Flux <a class="hash-link" href="#react-and-flux">#</a></h2>
|
||
<p><a href="https://github.com/christianalfoni">Christian Alfoni</a> wrote an article where <a href="http://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html">he compares Backbone, Angular and Flux</a> on a simple example that&#39;s representative of a real project he worked on.</p>
|
||
|
||
<blockquote>
|
||
<p>Wow, that was a bit more code! Well, try to think of it like this. In the above examples, if we were to do any changes to the application we would probably have to move things around. In the FLUX example we have considered that from the start.</p>
|
||
|
||
<p>Any changes to the application is adding, not moving things around. If you need a new store, just add it and make components dependant of it. If you need more views, create a component and use it inside any other component without affecting their current &quot;parent controller or models&quot;.</p>
|
||
|
||
<p><a href="http://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html">Read the full article...</a></p>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="flux-step-by-step-approach"></a>Flux: Step by Step approach <a class="hash-link" href="#flux-step-by-step-approach">#</a></h2>
|
||
<p><a href="https://github.com/durdn">Nicola Paolucci</a> from Atlassian wrote a great guide to help your getting understand <a href="http://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/">Flux step by step</a>.</p>
|
||
|
||
<p><center>
|
||
<a href="http://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/"><img src="/react/img/blog/flux-chart.png" width="400" /></a>
|
||
</center></p>
|
||
<h2><a class="anchor" name="delorean-back-to-the-future"></a>DeLorean: Back to the future! <a class="hash-link" href="#delorean-back-to-the-future">#</a></h2>
|
||
<p><a href="https://github.com/deloreanjs/delorean">DeLorean</a> is a tiny Flux pattern implementation developed by <a href="https://github.com/f">Fatih Kadir Akin</a>.</p>
|
||
|
||
<blockquote>
|
||
<ul>
|
||
<li>Unidirectional data flow, it makes your app logic simpler than MVC</li>
|
||
<li>Automatically listens to data changes and keeps your data updated</li>
|
||
<li>Makes data more consistent across your whole application</li>
|
||
<li>It&#39;s framework agnostic, completely. There&#39;s no view framework dependency</li>
|
||
<li>Very small, just 4K gzipped</li>
|
||
<li>Built-in React.js integration, easy to use with Flight.js and Ractive.js and probably all others</li>
|
||
<li>Improve your UI/data consistency using rollbacks</li>
|
||
</ul>
|
||
</blockquote>
|
||
<h2><a class="anchor" name="facebooks-ios-infrastructure"></a>Facebook&#39;s iOS Infrastructure <a class="hash-link" href="#facebooks-ios-infrastructure">#</a></h2>
|
||
<p>Last but not least, Flux and React ideas are not limited to JavaScript inside of the browser. The iOS team at Facebook re-implemented Newsfeed using very similar patterns.</p>
|
||
|
||
<iframe width="650" height="315" src="//www.youtube.com/embed/XhXC4SKOGfQ" frameborder="0" allowfullscreen></iframe>
|
||
<h2><a class="anchor" name="random-tweet"></a>Random Tweet <a class="hash-link" href="#random-tweet">#</a></h2>
|
||
<blockquote class="twitter-tweet" lang="en"><p>If you build your app with flux, you can swap out React for a canvas or svg view layer and keep 85% of your code. (or the thing after React)</p>&mdash; Ryan Florence (@ryanflorence) <a href="https://twitter.com/ryanflorence/status/507309645372076034">September 3, 2014</a></blockquote>
|
||
</description>
|
||
<pubDate>2014-10-17T00:00:00-07:00</pubDate>
|
||
<link>http://facebook.github.io/react/blog/2014/10/17/community-roundup-23.html</link>
|
||
<guid isPermaLink="true">http://facebook.github.io/react/blog/2014/10/17/community-roundup-23.html</guid>
|
||
</item>
|
||
|
||
</channel>
|
||
</rss>
|