<?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>https://facebook.github.io/react</link>
		<atom:link href="https://facebook.github.io/react/feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>React v15.0.1</title>
				<description>&lt;p&gt;Yesterday afternoon we shipped v15.0.0 and quickly got some feedback about a couple of issues. We apologize for these problems and we&amp;#39;ve been working since then to make sure we get fixes into your hands as quickly as possible.&lt;/p&gt;

&lt;p&gt;The first of these issues is related to the removal of an undocumented API. This API was added to enable &lt;a href=&quot;/react/docs/jsx-spread.html&quot;&gt;JSX Spread Attributes&lt;/a&gt; in our JS compile tools (react-tools, JSXTransformer) before &lt;code&gt;Object.assign&lt;/code&gt; was standard. When we stopped supporting these tools last year, we kept the API there to catch the longer tail of people using those tools. Meanwhile we moved to using Babel and encouraged others to do the same. Babel will typically compile the spread use to an &lt;code&gt;_extends&lt;/code&gt; helper, which will use &lt;code&gt;Object.assign&lt;/code&gt;. We did not properly research other compilation tools before deciding to remove the API in v15. Specifically, TypeScript and coffee-react are two popular packages using &lt;code&gt;React.__spread&lt;/code&gt;, as well as reactify which still makes use react-tools. In order to make sure that code compiled with these tools is not broken, we will be restoring the &lt;code&gt;React.__spread&lt;/code&gt; API and adding a warning. It will be removed in the future so if you maintain a project making using of it, we encourage you to compile to &lt;code&gt;Object.assign&lt;/code&gt; directly or a similar helper function.&lt;/p&gt;

&lt;p&gt;The second issue resulted in cursor position being lost in controlled inputs. We merged a pull request earlier this week to fix a separate regression from v0.14. Our goal was to target &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements but we ended up targeting all interactions with &lt;code&gt;value&lt;/code&gt; properties. Unfortunately we didn&amp;#39;t test it as thoroughly as we thought. We backed out the offending change and fixed the issue in different way which doesn&amp;#39;t have the same problem.&lt;/p&gt;

&lt;p&gt;We apologize if you installed 15.0.0 and have encountered these issues yourselves.&lt;/p&gt;

&lt;p&gt;As usual, you can get install the &lt;code&gt;react&lt;/code&gt; package via npm or download a browser bundle.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-15.0.1.js&quot;&gt;https://fb.me/react-15.0.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-15.0.1.min.js&quot;&gt;https://fb.me/react-15.0.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.1.js&quot;&gt;https://fb.me/react-with-addons-15.0.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.1.min.js&quot;&gt;https://fb.me/react-with-addons-15.0.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-15.0.1.js&quot;&gt;https://fb.me/react-dom-15.0.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-15.0.1.min.js&quot;&gt;https://fb.me/react-dom-15.0.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Restore &lt;code&gt;React.__spread&lt;/code&gt; API to unbreak code compiled with some tools making use of this undocumented API. It is now officially deprecated.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/zpao&quot;&gt;@zpao&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6444&quot;&gt;#6444&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;reactdom&quot;&gt;&lt;/a&gt;ReactDOM &lt;a class=&quot;hash-link&quot; href=&quot;#reactdom&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed issue resulting in loss of cursor position in controlled inputs.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6449&quot;&gt;#6449&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2016-04-08T00:00:00-07:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/04/08/react-v15.0.1.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/04/08/react-v15.0.1.html</guid>
			</item>
		
			<item>
				<title>React v15.0</title>
				<description>&lt;p&gt;We would like to thank the React community for reporting issues and regressions in the release candidates on our &lt;a href=&quot;https://github.com/facebook/react/issues/&quot;&gt;issue tracker&lt;/a&gt;. Over the last few weeks we fixed those issues, and now, after two release candidates, we are excited to finally release the stable version of React 15.&lt;/p&gt;

&lt;p&gt;As a reminder, &lt;a href=&quot;/react/blog/2016/02/19/new-versioning-scheme.html&quot;&gt;we’re switching to major versions&lt;/a&gt; to indicate that we have been using React in production for a long time. This 15.0 release follows our previous 0.14 version and we’ll continue to follow semver like we’ve been doing since 2013. It’s also worth noting that &lt;a href=&quot;/react/blog/2016/01/12/discontinuing-ie8-support.html&quot;&gt;we no longer actively support Internet Explorer 8&lt;/a&gt;. We believe React will work in its current form there but we will not be prioritizing any efforts to fix new issues that only affect IE8.&lt;/p&gt;

&lt;p&gt;React 15 brings significant improvements to how we interact with the DOM:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We are now using &lt;code&gt;document.createElement&lt;/code&gt; instead of setting &lt;code&gt;innerHTML&lt;/code&gt; when mounting components. This allows us to get rid of the &lt;code&gt;data-reactid&lt;/code&gt; attribute on every node and make the DOM lighter. Using &lt;code&gt;document.createElement&lt;/code&gt; is also faster in modern browsers and fixes a number of edge cases related to SVG elements and running multiple copies of React on the same page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Historically our support for SVG has been incomplete, and many tags and attributes were missing. We heard you, and in React 15 we &lt;a href=&quot;https://github.com/facebook/react/pull/6243&quot;&gt;added support for all the SVG attributes that are recognized by today’s browsers&lt;/a&gt;. If we missed any of the attributes you’d like to use, please &lt;a href=&quot;https://github.com/facebook/react/issues/1657&quot;&gt;let us know&lt;/a&gt;. As a bonus, thanks to using &lt;code&gt;document.createElement&lt;/code&gt;, we no longer need to maintain a list of SVG tags, so any SVG tags that were previously unsupported should work just fine in React 15.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We received some amazing contributions from the community in this release, and we would like to highlight &lt;a href=&quot;https://github.com/facebook/react/pull/5753&quot;&gt;this pull request&lt;/a&gt; by &lt;a href=&quot;https://github.com/mwiencek&quot;&gt;Michael Wiencek&lt;/a&gt; in particular. Thanks to Michael’s work, React 15 no longer emits extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; nodes around the text, making the DOM output much cleaner. This was a longstanding annoyance for React users so it’s exciting to accept this as an outside contribution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While this isn’t directly related to the release, we understand that in order to receive more community contributions like Michael’s, we need to communicate our goals and priorities more openly, and review pull requests more decisively. As a first step towards this, we started publishing &lt;a href=&quot;https://github.com/reactjs/core-notes&quot;&gt;React core team weekly meeting notes&lt;/a&gt; again. We also intend to introduce an RFC process inspired by &lt;a href=&quot;https://github.com/emberjs/rfcs&quot;&gt;Ember RFCs&lt;/a&gt; so external contributors can have more insight and influence in the future development of React. We will keep you updated about this on our blog.&lt;/p&gt;

&lt;p&gt;We are also experimenting with a new changelog format in this post. Every change now links to the corresponding pull request and mentions the author. Let us know whether you find this useful!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;upgrade-guide&quot;&gt;&lt;/a&gt;Upgrade Guide &lt;a class=&quot;hash-link&quot; href=&quot;#upgrade-guide&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As usual with major releases, React 15 will remove support for some of the patterns deprecated nine months ago in React 0.14. We know changes can be painful (the Facebook codebase has over 20,000 React components, and that’s not even counting React Native), so we always try to make changes gradually in order to minimize the pain.&lt;/p&gt;

&lt;p&gt;If your code is free of warnings when running under React 0.14, upgrading should be easy. The bulk of changes in this release are actually behind the scenes, impacting the way that React interacts with the DOM. The other substantial change is that React now supports the full range of SVG elements and attributes. Beyond that we have a large number of incremental improvements and additional warnings aimed to aid developers. We’ve also laid some groundwork in the core to bring you some new capabilities in future releases.&lt;/p&gt;

&lt;p&gt;See the changelog below for more details.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;installation&quot;&gt;&lt;/a&gt;Installation &lt;a class=&quot;hash-link&quot; href=&quot;#installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We recommend using React from &lt;code&gt;npm&lt;/code&gt; and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;npm install --save react react-dom&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the &lt;code&gt;NODE_ENV&lt;/code&gt; environment variable to &lt;code&gt;production&lt;/code&gt; to use the production build of React which does not include the development warnings and runs significantly faster.&lt;/p&gt;

&lt;p&gt;If you can’t use &lt;code&gt;npm&lt;/code&gt; yet, we provide pre-built browser builds for your convenience, which are also available in the &lt;code&gt;react&lt;/code&gt; package on bower.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-15.0.0.js&quot;&gt;https://fb.me/react-15.0.0.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-15.0.0.min.js&quot;&gt;https://fb.me/react-15.0.0.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0.js&quot;&gt;https://fb.me/react-with-addons-15.0.0.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0.min.js&quot;&gt;https://fb.me/react-with-addons-15.0.0.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-15.0.0.js&quot;&gt;https://fb.me/react-dom-15.0.0.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-15.0.0.min.js&quot;&gt;https://fb.me/react-dom-15.0.0.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;major-changes&quot;&gt;&lt;/a&gt;Major changes &lt;a class=&quot;hash-link&quot; href=&quot;#major-changes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;document.createelement-is-in-and-data-reactid-is-out&quot;&gt;&lt;/a&gt;&lt;code&gt;document.createElement&lt;/code&gt; is in and &lt;code&gt;data-reactid&lt;/code&gt; is out &lt;a class=&quot;hash-link&quot; href=&quot;#document.createelement-is-in-and-data-reactid-is-out&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;There were a number of large changes to our interactions with the DOM. One of the most noticeable changes is that we no longer set the &lt;code&gt;data-reactid&lt;/code&gt; attribute for each DOM node. While this will make it more difficult to know if a website is using React, the advantage is that the DOM is much more lightweight. This change was made possible by us switching to use &lt;code&gt;document.createElement&lt;/code&gt; on initial render. Previously we would generate a large string of HTML and then set &lt;code&gt;node.innerHTML&lt;/code&gt;. At the time, this was decided to be faster than using &lt;code&gt;document.createElement&lt;/code&gt; for the majority of cases and browsers that we supported. Browsers have continued to improve and so overwhelmingly this is no longer true. By using &lt;code&gt;createElement&lt;/code&gt; we can make other parts of React faster. The ids were used to map back from events to the original React component, meaning we had to do a bunch of work on every event, even though we cached this data heavily. As we’ve all experienced, caching and in particularly invalidating caches, can be error prone and we saw many hard to reproduce issues over the years as a result. Now we can build up a direct mapping at render time since we already have a handle on the node.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;data-reactid&lt;/code&gt; is still present for server-rendered content, however it is much smaller than before and is simply an auto-incrementing counter.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5205&quot;&gt;#5205&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;no-more-extra-ltspangts&quot;&gt;&lt;/a&gt;No more extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s &lt;a class=&quot;hash-link&quot; href=&quot;#no-more-extra-ltspangts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Another big change with our DOM interaction is how we render text blocks. Previously you may have noticed that React rendered a lot of extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. For example, in our most basic example on the home page we render &lt;code&gt;&amp;lt;div&amp;gt;Hello {this.props.name}&amp;lt;/div&amp;gt;&lt;/code&gt;, resulting in markup that contained 2 &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. Now we’ll render plain text nodes interspersed with comment nodes that are used for demarcation. This gives us the same ability to update individual pieces of text, without creating extra nested nodes. Very few people have depended on the actual markup generated here so it’s likely you are not impacted. However if you were targeting these &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s in your CSS, you will need to adjust accordingly. You can always render them explicitly in your components.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/mwiencek&quot;&gt;@mwiencek&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5753&quot;&gt;#5753&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;rendering-null-now-uses-comment-nodes&quot;&gt;&lt;/a&gt;Rendering &lt;code&gt;null&lt;/code&gt; now uses comment nodes &lt;a class=&quot;hash-link&quot; href=&quot;#rendering-null-now-uses-comment-nodes&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We’ve also made use of these comment nodes to change what &lt;code&gt;null&lt;/code&gt; renders to. Rendering to &lt;code&gt;null&lt;/code&gt; was a feature we added in React 0.11 and was implemented by rendering &lt;code&gt;&amp;lt;noscript&amp;gt;&lt;/code&gt; elements. By rendering to comment nodes now, there’s a chance some of your CSS will be targeting the wrong thing, specifically if you are making use of &lt;code&gt;:nth-child&lt;/code&gt; selectors. React’s use of the &lt;code&gt;&amp;lt;noscript&amp;gt;&lt;/code&gt; tag has always been considered an implementation detail of how React targets the DOM. We believe they are safe changes to make without going through a release with warnings detailing the subtle differences as they are details that should not be depended upon. Additionally, we have seen that these changes have improved React performance for many typical applications.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5451&quot;&gt;#5451&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;functional-components-can-now-return-null-too&quot;&gt;&lt;/a&gt;Functional components can now return &lt;code&gt;null&lt;/code&gt; too &lt;a class=&quot;hash-link&quot; href=&quot;#functional-components-can-now-return-null-too&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We added support for &lt;a href=&quot;/react/blog/2015/09/10/react-v0.14-rc1.html#stateless-function-components&quot;&gt;defining stateless components as functions&lt;/a&gt; in React 0.14. However, React 0.14 still allowed you to define a class component without extending &lt;code&gt;React.Component&lt;/code&gt; or using &lt;code&gt;React.createClass()&lt;/code&gt;, so &lt;a href=&quot;https://github.com/facebook/react/issues/5355&quot;&gt;we couldn’t reliably tell if your component is a function or a class&lt;/a&gt;, and did not allow returning &lt;code&gt;null&lt;/code&gt; from it. This issue is solved in React 15, and you can now return &lt;code&gt;null&lt;/code&gt; from any component, whether it is a class or a function.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5884&quot;&gt;#5884&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;improved-svg-support&quot;&gt;&lt;/a&gt;Improved SVG support &lt;a class=&quot;hash-link&quot; href=&quot;#improved-svg-support&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;All SVG tags are now fully supported. (Uncommon SVG tags are not present on the &lt;code&gt;React.DOM&lt;/code&gt; element helper, but JSX and &lt;code&gt;React.createElement&lt;/code&gt; work on all tag names.) All SVG attributes that are implemented by the browsers should be supported too. If you find any attributes that we have missed, please &lt;a href=&quot;https://github.com/facebook/react/issues/1657&quot;&gt;let us know in this issue&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/zpao&quot;&gt;@zpao&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6243&quot;&gt;#6243&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;breaking-changes&quot;&gt;&lt;/a&gt;Breaking changes &lt;a class=&quot;hash-link&quot; href=&quot;#breaking-changes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;no-more-extra-ltspangts&quot;&gt;&lt;/a&gt;No more extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s &lt;a class=&quot;hash-link&quot; href=&quot;#no-more-extra-ltspangts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;It’s worth calling out the DOM structure changes above again, in particular the change from &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. In the course of updating the Facebook codebase, we found a very small amount of code that was depending on the markup that React generated. Some of these cases were integration tests like WebDriver which were doing very specific XPath queries to target nodes. Others were simply tests using &lt;code&gt;ReactDOM.renderToStaticMarkup&lt;/code&gt; and comparing markup. Again, there were a very small number of changes that had to be made, but we don’t want anybody to be blindsided. We encourage everybody to run their test suites when upgrading and consider alternative approaches when possible. One approach that will work for some cases is to explicitly use &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s in your &lt;code&gt;render&lt;/code&gt; method.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/mwiencek&quot;&gt;@mwiencek&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5753&quot;&gt;#5753&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;react.cloneelement-now-resolves-defaultprops&quot;&gt;&lt;/a&gt;&lt;code&gt;React.cloneElement()&lt;/code&gt; now resolves &lt;code&gt;defaultProps&lt;/code&gt; &lt;a class=&quot;hash-link&quot; href=&quot;#react.cloneelement-now-resolves-defaultprops&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We fixed a bug in &lt;code&gt;React.cloneElement()&lt;/code&gt; that some components may rely on. If some of the &lt;code&gt;props&lt;/code&gt; received by &lt;code&gt;cloneElement()&lt;/code&gt; are &lt;code&gt;undefined&lt;/code&gt;, it used to return an element with &lt;code&gt;undefined&lt;/code&gt; values for those props. In React 15, we’re changing it to be consistent with &lt;code&gt;createElement()&lt;/code&gt;. Now any &lt;code&gt;undefined&lt;/code&gt; props passed to &lt;code&gt;cloneElement()&lt;/code&gt; are resolved to the corresponding component’s &lt;code&gt;defaultProps&lt;/code&gt;. Only one of our 20,000 React components was negatively affected by this so we feel comfortable releasing this change without keeping the old behavior for another release cycle.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/truongduy134&quot;&gt;@truongduy134&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5997&quot;&gt;#5997&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;reactperf.getlastmeasurements-is-opaque&quot;&gt;&lt;/a&gt;&lt;code&gt;ReactPerf.getLastMeasurements()&lt;/code&gt; is opaque &lt;a class=&quot;hash-link&quot; href=&quot;#reactperf.getlastmeasurements-is-opaque&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This change won’t affect applications but may break some third-party tools. We are &lt;a href=&quot;https://github.com/facebook/react/pull/6046&quot;&gt;revamping &lt;code&gt;ReactPerf&lt;/code&gt; implementation&lt;/a&gt; and plan to release it during the 15.x cycle. The internal performance measurement format is subject to change so, for the time being, we consider the return value of &lt;code&gt;ReactPerf.getLastMeasurements()&lt;/code&gt; an opaque data structure that should not be relied upon.  &lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://github.com/gaearon&quot;&gt;@gaearon&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6286&quot;&gt;#6286&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;removed-deprecations&quot;&gt;&lt;/a&gt;Removed deprecations &lt;a class=&quot;hash-link&quot; href=&quot;#removed-deprecations&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;These deprecations were introduced nine months ago in v0.14 with a warning and are removed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deprecated APIs are removed from the &lt;code&gt;React&lt;/code&gt; top-level export: &lt;code&gt;findDOMNode&lt;/code&gt;, &lt;code&gt;render&lt;/code&gt;, &lt;code&gt;renderToString&lt;/code&gt;, &lt;code&gt;renderToStaticMarkup&lt;/code&gt;, and &lt;code&gt;unmountComponentAtNode&lt;/code&gt;. As a reminder, they are now available on &lt;code&gt;ReactDOM&lt;/code&gt; and &lt;code&gt;ReactDOMServer&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5832&quot;&gt;#5832&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;Deprecated addons are removed: &lt;code&gt;batchedUpdates&lt;/code&gt; and &lt;code&gt;cloneWithProps&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5859&quot;&gt;#5859&lt;/a&gt;, &lt;a href=&quot;https://github.com/zpao&quot;&gt;@zpao&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6016&quot;&gt;#6016&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;Deprecated component instance methods are removed: &lt;code&gt;setProps&lt;/code&gt;, &lt;code&gt;replaceProps&lt;/code&gt;, and &lt;code&gt;getDOMNode&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5570&quot;&gt;#5570&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;Deprecated CommonJS &lt;code&gt;react/addons&lt;/code&gt; entry point is removed. As a reminder, you should use separate &lt;code&gt;react-addons-*&lt;/code&gt; packages instead. This only applies if you use the CommonJS builds.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/gaearon&quot;&gt;@gaearon&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6285&quot;&gt;#6285&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;Passing &lt;code&gt;children&lt;/code&gt; to void elements like &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; was deprecated, and now throws an error.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jonhester&quot;&gt;@jonhester&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/3372&quot;&gt;#3372&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;React-specific properties on DOM &lt;code&gt;refs&lt;/code&gt; (e.g. &lt;code&gt;this.refs.div.props&lt;/code&gt;) were deprecated, and are removed now.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5495&quot;&gt;#5495&lt;/a&gt;&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;new-deprecations-introduced-with-a-warning&quot;&gt;&lt;/a&gt;New deprecations, introduced with a warning &lt;a class=&quot;hash-link&quot; href=&quot;#new-deprecations-introduced-with-a-warning&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each of these changes will continue to work as before with a new warning until the release of React 16 so you can upgrade your code gradually.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;LinkedStateMixin&lt;/code&gt; and &lt;code&gt;valueLink&lt;/code&gt; are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior: &lt;a href=&quot;https://www.npmjs.com/package/react-linked-input&quot;&gt;react-linked-input&lt;/a&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6127&quot;&gt;#6127&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Future versions of React will treat &lt;code&gt;&amp;lt;input value={null}&amp;gt;&lt;/code&gt; as a request to clear the input. However, React 0.14 has been ignoring &lt;code&gt;value={null}&lt;/code&gt;. React 15 warns you on a &lt;code&gt;null&lt;/code&gt; input value and offers you to clarify your intention. To fix the warning, you may explicitly pass an empty string to clear a controlled input, or pass &lt;code&gt;undefined&lt;/code&gt; to make the input uncontrolled.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/antoaravinth&quot;&gt;@antoaravinth&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5048&quot;&gt;#5048&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ReactPerf.printDOM()&lt;/code&gt; was renamed to &lt;code&gt;ReactPerf.printOperations()&lt;/code&gt;, and &lt;code&gt;ReactPerf.getMeasurementsSummaryMap()&lt;/code&gt; was renamed to &lt;code&gt;ReactPerf.getWasted()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/gaearon&quot;&gt;@gaearon&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6287&quot;&gt;#6287&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;new-helpful-warnings&quot;&gt;&lt;/a&gt;New helpful warnings &lt;a class=&quot;hash-link&quot; href=&quot;#new-helpful-warnings&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you use a minified copy of the &lt;em&gt;development&lt;/em&gt; build, React DOM kindly encourages you to use the faster production build instead.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5083&quot;&gt;#5083&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM: When specifying a unit-less CSS value as a string, a future version will not add &lt;code&gt;px&lt;/code&gt; automatically. This version now warns in this case (ex: writing &lt;code&gt;style={{width: &amp;#39;300&amp;#39;}}&lt;/code&gt;. Unitless &lt;em&gt;number&lt;/em&gt; values like &lt;code&gt;width: 300&lt;/code&gt; are unchanged.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/pluma&quot;&gt;@pluma&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5140&quot;&gt;#5140&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/kentcdodds&quot;&gt;@kentcdodds&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5940&quot;&gt;#5940&lt;/a&gt; and &lt;a href=&quot;https://github.com/koba04&quot;&gt;@koba04&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5947&quot;&gt;#5947&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elements will now warn when attempting to read &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;key&lt;/code&gt; from the props.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/prometheansacrifice&quot;&gt;@prometheansacrifice&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5744&quot;&gt;#5744&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React will now warn if you pass a different &lt;code&gt;props&lt;/code&gt; object to &lt;code&gt;super()&lt;/code&gt; in the constructor.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/prometheansacrifice&quot;&gt;@prometheansacrifice&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5346&quot;&gt;#5346&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React will now warn if you call &lt;code&gt;setState()&lt;/code&gt; inside &lt;code&gt;getChildContext()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/raineroviir&quot;&gt;@raineroviir&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6121&quot;&gt;#6121&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now attempts to warn for mistyped event handlers on DOM elements, such as &lt;code&gt;onclick&lt;/code&gt; which should be &lt;code&gt;onClick&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/ali&quot;&gt;@ali&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5361&quot;&gt;#5361&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now warns about &lt;code&gt;NaN&lt;/code&gt; values in &lt;code&gt;style&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jontewks&quot;&gt;@jontewks&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5811&quot;&gt;#5811&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now warns if you specify both &lt;code&gt;value&lt;/code&gt; and &lt;code&gt;defaultValue&lt;/code&gt; for an input.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/mgmcdermott&quot;&gt;@mgmcdermott&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5823&quot;&gt;#5823&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now warns if an input switches between being controlled and uncontrolled.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/TheBlasfem&quot;&gt;@TheBlasfem&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5864&quot;&gt;#5864&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now warns if you specify &lt;code&gt;onFocusIn&lt;/code&gt; or &lt;code&gt;onFocusOut&lt;/code&gt; handlers as they are unnecessary in React.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jontewks&quot;&gt;@jontewks&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6296&quot;&gt;#6296&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React now prints a descriptive error message when you pass an invalid callback as the last argument to &lt;code&gt;ReactDOM.render()&lt;/code&gt;, &lt;code&gt;this.setState()&lt;/code&gt;, or &lt;code&gt;this.forceUpdate()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/conorhastings&quot;&gt;@conorhastings&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5193&quot;&gt;#5193&lt;/a&gt; and &lt;a href=&quot;https://github.com/gaearon&quot;&gt;@gaearon&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6310&quot;&gt;#6310&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add-Ons: &lt;code&gt;TestUtils.Simulate()&lt;/code&gt; now prints a helpful message if you attempt to use it with shallow rendering.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/conorhastings&quot;&gt;@conorhastings&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5358&quot;&gt;#5358&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PropTypes: &lt;code&gt;arrayOf()&lt;/code&gt; and &lt;code&gt;objectOf()&lt;/code&gt; provide better error messages for invalid arguments.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/chicoxyzzy&quot;&gt;@chicoxyzzy&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5390&quot;&gt;#5390&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;notable-bug-fixes&quot;&gt;&lt;/a&gt;Notable bug fixes &lt;a class=&quot;hash-link&quot; href=&quot;#notable-bug-fixes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fixed multiple small memory leaks.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/4983&quot;&gt;#4983&lt;/a&gt; and &lt;a href=&quot;https://github.com/victor-homyakov&quot;&gt;@victor-homyakov&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6309&quot;&gt;#6309&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Input events are handled more reliably in IE 10 and IE 11; spurious events no longer fire when using a placeholder.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jquense&quot;&gt;@jquense&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/4051&quot;&gt;#4051&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;componentWillReceiveProps()&lt;/code&gt; lifecycle method is now consistently called when &lt;code&gt;context&lt;/code&gt; changes.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/milesj&quot;&gt;@milesj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5787&quot;&gt;#5787&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;React.cloneElement()&lt;/code&gt; doesn’t append slash to an existing &lt;code&gt;key&lt;/code&gt; when used inside &lt;code&gt;React.Children.map()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/ianobermiller&quot;&gt;@ianobermiller&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5892&quot;&gt;#5892&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now supports the &lt;code&gt;cite&lt;/code&gt; and &lt;code&gt;profile&lt;/code&gt; HTML attributes.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/AprilArcus&quot;&gt;@AprilArcus&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6094&quot;&gt;#6094&lt;/a&gt; and &lt;a href=&quot;https://github.com/saiichihashimoto&quot;&gt;@saiichihashimoto&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6032&quot;&gt;#6032&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now supports &lt;code&gt;cssFloat&lt;/code&gt;, &lt;code&gt;gridRow&lt;/code&gt; and &lt;code&gt;gridColumn&lt;/code&gt; CSS properties.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/stevenvachon&quot;&gt;@stevenvachon&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6133&quot;&gt;#6133&lt;/a&gt; and  &lt;a href=&quot;https://github.com/mnordick&quot;&gt;@mnordick&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/4779&quot;&gt;#4779&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now correctly handles &lt;code&gt;borderImageOutset&lt;/code&gt;, &lt;code&gt;borderImageWidth&lt;/code&gt;, &lt;code&gt;borderImageSlice&lt;/code&gt;, &lt;code&gt;floodOpacity&lt;/code&gt;, &lt;code&gt;strokeDasharray&lt;/code&gt;, and &lt;code&gt;strokeMiterlimit&lt;/code&gt; as unitless CSS properties.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/rofrischmann&quot;&gt;@rofrischmann&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6210&quot;&gt;#6210&lt;/a&gt; and &lt;a href=&quot;https://github.com/facebook/react/pull/6270&quot;&gt;#6270&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now supports the &lt;code&gt;onAnimationStart&lt;/code&gt;, &lt;code&gt;onAnimationEnd&lt;/code&gt;, &lt;code&gt;onAnimationIteration&lt;/code&gt;, &lt;code&gt;onTransitionEnd&lt;/code&gt;, and &lt;code&gt;onInvalid&lt;/code&gt; events. Support for &lt;code&gt;onLoad&lt;/code&gt; has been added to &lt;code&gt;object&lt;/code&gt; elements.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/tomduncalf&quot;&gt;@tomduncalf&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5187&quot;&gt;#5187&lt;/a&gt;,  &lt;a href=&quot;https://github.com/milesj&quot;&gt;@milesj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6005&quot;&gt;#6005&lt;/a&gt;, and &lt;a href=&quot;https://github.com/ara4n&quot;&gt;@ara4n&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5781&quot;&gt;#5781&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now defaults to using DOM attributes instead of properties, which fixes a few edge case bugs. Additionally the nullification of values (ex: &lt;code&gt;href={null}&lt;/code&gt;) now results in the forceful removal, no longer trying to set to the default value used by browsers in the absence of a value.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/syranide&quot;&gt;@syranide&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/1510&quot;&gt;#1510&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM does not mistakingly coerce &lt;code&gt;children&lt;/code&gt; to strings for Web Components.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/jimfb&quot;&gt;@jimfb&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5093&quot;&gt;#5093&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now correctly normalizes SVG &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt; events.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/edmellum&quot;&gt;@edmellum&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5720&quot;&gt;#5720&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM does not throw if a &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; is unmounted while its &lt;code&gt;onChange&lt;/code&gt; handler is executing.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/sambev&quot;&gt;@sambev&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6028&quot;&gt;#6028&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM does not throw in Windows 8 apps.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/Andrew8xx8&quot;&gt;@Andrew8xx8&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6063&quot;&gt;#6063&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM does not throw when asynchronously unmounting a child with a &lt;code&gt;ref&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/yiminghe&quot;&gt;@yiminghe&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6095&quot;&gt;#6095&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM no longer forces synchronous layout because of scroll position tracking.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/syranide&quot;&gt;@syranide&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/2271&quot;&gt;#2271&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Object.is&lt;/code&gt; is used in a number of places to compare values, which leads to fewer false positives, especially involving &lt;code&gt;NaN&lt;/code&gt;. In particular, this affects the &lt;code&gt;shallowCompare&lt;/code&gt; add-on.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/chicoxyzzy&quot;&gt;@chicoxyzzy&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6132&quot;&gt;#6132&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add-Ons: ReactPerf no longer instruments adding or removing an event listener because they don’t really touch the DOM due to event delegation.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/antoaravinth&quot;&gt;@antoaravinth&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5209&quot;&gt;#5209&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;other-improvements&quot;&gt;&lt;/a&gt; Other improvements &lt;a class=&quot;hash-link&quot; href=&quot;#other-improvements&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;React now uses &lt;code&gt;loose-envify&lt;/code&gt; instead of &lt;code&gt;envify&lt;/code&gt; so it installs fewer transitive dependencies.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/qerub&quot;&gt;@qerub&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6303&quot;&gt;#6303&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shallow renderer now exposes &lt;code&gt;getMountedInstance()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/glenjamin&quot;&gt;@glenjamin&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/4918&quot;&gt;#4918&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shallow renderer now returns the rendered output from &lt;code&gt;render()&lt;/code&gt;.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/simonewebdesign&quot;&gt;@simonewebdesign&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5411&quot;&gt;#5411&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React no longer depends on ES5 &lt;em&gt;shams&lt;/em&gt; for &lt;code&gt;Object.create&lt;/code&gt; and &lt;code&gt;Object.freeze&lt;/code&gt; in older environments. It still, however, requires ES5 &lt;em&gt;shims&lt;/em&gt; in those environments.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/dgreensp&quot;&gt;@dgreensp&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/4959&quot;&gt;#4959&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM now allows &lt;code&gt;data-&lt;/code&gt; attributes with names that start with numbers.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/nLight&quot;&gt;@nLight&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5216&quot;&gt;#5216&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React DOM adds a new &lt;code&gt;suppressContentEditableWarning&lt;/code&gt; prop for components like &lt;a href=&quot;https://facebook.github.io/draft-js/&quot;&gt;Draft.js&lt;/a&gt; that intentionally manage &lt;code&gt;contentEditable&lt;/code&gt; children with React.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/mxstbr&quot;&gt;@mxstbr&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/6112&quot;&gt;#6112&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React improves the performance for &lt;code&gt;createClass()&lt;/code&gt; on complex specs.&lt;br&gt;
&lt;small&gt;&lt;a href=&quot;https://github.com/spicyj&quot;&gt;@spicyj&lt;/a&gt; in &lt;a href=&quot;https://github.com/facebook/react/pull/5550&quot;&gt;#5550&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2016-04-07T00:00:00-07:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/04/07/react-v15.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/04/07/react-v15.html</guid>
			</item>
		
			<item>
				<title>React v0.14.8</title>
				<description>&lt;p&gt;We have already released two release candidates for React 15, and the final version is coming soon.&lt;/p&gt;

&lt;p&gt;However &lt;a href=&quot;https://github.com/iancmyers&quot;&gt;Ian Christian Myers&lt;/a&gt; discovered a memory leak related to server rendering in React 0.14 and &lt;a href=&quot;https://github.com/facebook/react/pull/6060&quot;&gt;contributed a fix&lt;/a&gt;. While this memory leak has already been fixed in a different way in the React 15 release candidates, we decided to cut another 0.14 release that contains just this fix.&lt;/p&gt;

&lt;p&gt;The release is now available for download:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-0.14.8.js&quot;&gt;https://fb.me/react-0.14.8.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-0.14.8.min.js&quot;&gt;https://fb.me/react-0.14.8.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-0.14.8.js&quot;&gt;https://fb.me/react-with-addons-0.14.8.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-0.14.8.min.js&quot;&gt;https://fb.me/react-with-addons-0.14.8.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-0.14.8.js&quot;&gt;https://fb.me/react-dom-0.14.8.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-0.14.8.min.js&quot;&gt;https://fb.me/react-dom-0.14.8.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM Server&lt;/strong&gt; (include React in the page before React DOM Server)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-server-0.14.8.js&quot;&gt;https://fb.me/react-dom-server-0.14.8.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-server-0.14.8.min.js&quot;&gt;https://fb.me/react-dom-server-0.14.8.min.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We&amp;#39;ve also published version &lt;code&gt;0.14.8&lt;/code&gt; of the &lt;code&gt;react&lt;/code&gt;, &lt;code&gt;react-dom&lt;/code&gt;, and addons packages on npm and the &lt;code&gt;react&lt;/code&gt; package on bower.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed memory leak when rendering on the server&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2016-03-29T00:00:00-07:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/03/29/react-v0.14.8.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/03/29/react-v0.14.8.html</guid>
			</item>
		
			<item>
				<title>React v15.0 Release Candidate 2</title>
				<description>&lt;p&gt;Today we&amp;#39;re releasing a second release candidate for version 15. Primarily this is to address 2 issues, but we also picked up a few small changes from new contributors, including some improvements to some of our new warnings.&lt;/p&gt;

&lt;p&gt;The most pressing change that was made is to fix a bug in our new code that removes &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s, as discussed in the original RC1 post. Specifically we have some code that takes a different path in IE11 and Edge due to the speed of some DOM operations. There was a bug in this code which didn&amp;#39;t break out of the optimization for &lt;code&gt;DocumentFragment&lt;/code&gt;s, resulting in text not appearing at all. Thanks to the several people who &lt;a href=&quot;https://github.com/facebook/react/issues/6246&quot;&gt;reported this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The other change is to our SVG code. In RC1 we had made the decision to pass through all attributes directly. This led to &lt;a href=&quot;https://github.com/facebook/react/issues/6211&quot;&gt;some confusion with &lt;code&gt;class&lt;/code&gt; vs &lt;code&gt;className&lt;/code&gt;&lt;/a&gt; and ultimately led us to reconsider our position on the approach. Passing through all attributes meant that we would have two different patterns for using React where things like hyphenated attributes would work for SVG but not HTML. In the future, we &lt;em&gt;might&lt;/em&gt; change our approach to the problem for HTML as well but in the meantime, maintaining consistency is important. So we reverted the changes that allowed the attributes to be passed through and instead expanded the SVG property list to include all attributes that are in the spec. We believe we have everything now but definitely &lt;a href=&quot;https://github.com/facebook/react/issues/1657#issuecomment-197031403&quot;&gt;let us know&lt;/a&gt; if we missed anything. It was and still is our intent to support the full range of SVG tags and attributes in this release.&lt;/p&gt;

&lt;p&gt;Thanks again to everybody who has tried the RC1 and reported issues. It has been extremely important and we wouldn&amp;#39;t be able to do this without your help!&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;installation&quot;&gt;&lt;/a&gt;Installation &lt;a class=&quot;hash-link&quot; href=&quot;#installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We recommend using React from &lt;code&gt;npm&lt;/code&gt; and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;npm install --save react@15.0.0-rc.2 react-dom@15.0.0-rc.2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the &lt;code&gt;NODE_ENV&lt;/code&gt; environment variable to &lt;code&gt;production&lt;/code&gt; to use the production build of React which does not include the development warnings and runs significantly faster.&lt;/p&gt;

&lt;p&gt;If you can’t use &lt;code&gt;npm&lt;/code&gt; yet, we provide pre-built browser builds for your convenience, which are also available in the &lt;code&gt;react&lt;/code&gt; package on bower.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-15.0.0-rc.2.js&quot;&gt;https://fb.me/react-15.0.0-rc.2.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-15.0.0-rc.2.min.js&quot;&gt;https://fb.me/react-15.0.0-rc.2.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0-rc.2.js&quot;&gt;https://fb.me/react-with-addons-15.0.0-rc.2.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0-rc.2.min.js&quot;&gt;https://fb.me/react-with-addons-15.0.0-rc.2.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-15.0.0-rc.2.js&quot;&gt;https://fb.me/react-dom-15.0.0-rc.2.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-15.0.0-rc.2.min.js&quot;&gt;https://fb.me/react-dom-15.0.0-rc.2.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2016-03-16T00:00:00-07:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/03/16/react-v15-rc2.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/03/16/react-v15-rc2.html</guid>
			</item>
		
			<item>
				<title>React v15.0 Release Candidate</title>
				<description>&lt;p&gt;Sorry for the small delay in releasing this. As we said, we&amp;#39;ve been busy binge-watching House of Cards. That scene in the last episode where Francis and Claire Underwood &lt;abbr title=&quot;You didn't think we would actually spoil anything did you?&quot;&gt;████████████████████████████████████&lt;/abbr&gt;. WOW!&lt;/p&gt;

&lt;p&gt;But now we&amp;#39;re ready, so without further ado, we&amp;#39;re shipping a release candidate for React v15 now. As a reminder, &lt;a href=&quot;/react/blog/2016/02/19/new-versioning-scheme.html&quot;&gt;we&amp;#39;re switching to major versions&lt;/a&gt; to indicate that we have been using React in production for a long time. This 15.0 release follows our previous 0.14 version and we&amp;#39;ll continue to follow semver like we&amp;#39;ve been doing since 2013. It&amp;#39;s also worth noting that &lt;a href=&quot;/react/blog/2016/01/12/discontinuing-ie8-support.html&quot;&gt;we no longer actively support Internet Explorer 8&lt;/a&gt;. We believe React will work in its current form there but we will not be prioritizing any efforts to fix new issues that only affect IE8.&lt;/p&gt;

&lt;p&gt;Please try it out before we publish the final release. Let us know if you run into any problems by filing issues on our &lt;a href=&quot;https://github.com/facebook/react&quot;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;upgrade-guide&quot;&gt;&lt;/a&gt;Upgrade Guide &lt;a class=&quot;hash-link&quot; href=&quot;#upgrade-guide&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Like always, we have a few breaking changes in this release. We know changes can be painful (the Facebook codebase has over 15,000 React components), so we always try to make changes gradually in order to minimize the pain.&lt;/p&gt;

&lt;p&gt;If your code is free of warnings when running under React 0.14, upgrading should be easy. The bulk of changes in this release are actually behind the scenes, impacting the way that React interacts with the DOM. The other substantial change is that React now supports the full range of SVG elements and attributes. Beyond that we have a large number of incremental improvements and additional warnings aimed to aid developers. We&amp;#39;ve also laid some groundwork in the core to bring you some new capabilities in future releases.&lt;/p&gt;

&lt;p&gt;See the changelog below for more details.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;installation&quot;&gt;&lt;/a&gt;Installation &lt;a class=&quot;hash-link&quot; href=&quot;#installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We recommend using React from &lt;code&gt;npm&lt;/code&gt; and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;npm install --save react@15.0.0-rc.1 react-dom@15.0.0-rc.1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the &lt;code&gt;NODE_ENV&lt;/code&gt; environment variable to &lt;code&gt;production&lt;/code&gt; to use the production build of React which does not include the development warnings and runs significantly faster.&lt;/p&gt;

&lt;p&gt;If you can’t use &lt;code&gt;npm&lt;/code&gt; yet, we provide pre-built browser builds for your convenience, which are also available in the &lt;code&gt;react&lt;/code&gt; package on bower.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-15.0.0-rc.1.js&quot;&gt;https://fb.me/react-15.0.0-rc.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-15.0.0-rc.1.min.js&quot;&gt;https://fb.me/react-15.0.0-rc.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0-rc.1.js&quot;&gt;https://fb.me/react-with-addons-15.0.0-rc.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-15.0.0-rc.1.min.js&quot;&gt;https://fb.me/react-with-addons-15.0.0-rc.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-15.0.0-rc.1.js&quot;&gt;https://fb.me/react-dom-15.0.0-rc.1.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-15.0.0-rc.1.min.js&quot;&gt;https://fb.me/react-dom-15.0.0-rc.1.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;major-changes&quot;&gt;&lt;/a&gt;Major changes &lt;a class=&quot;hash-link&quot; href=&quot;#major-changes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;document.createelement-is-in-and-data-reactid-is-out&quot;&gt;&lt;/a&gt;&lt;code&gt;document.createElement&lt;/code&gt; is in and &lt;code&gt;data-reactid&lt;/code&gt; is out &lt;a class=&quot;hash-link&quot; href=&quot;#document.createelement-is-in-and-data-reactid-is-out&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;There were a number of large changes to our interactions with the DOM. One of the most noticeable changes is that we no longer set the &lt;code&gt;data-reactid&lt;/code&gt; attribute for each DOM node. While this will make it much more difficult to know if a website is using React, the advantage is that the DOM is much more lightweight. This change was made possible by us switching to use &lt;code&gt;document.createElement&lt;/code&gt; on initial render. Previously we would generate a large string of HTML and then set &lt;code&gt;node.innerHTML&lt;/code&gt;. At the time, this was decided to be faster than using &lt;code&gt;document.createElement&lt;/code&gt; for the majority of cases and browsers that we supported. Browsers have continued to improve and so overwhelmingly this is no longer true. By using &lt;code&gt;createElement&lt;/code&gt; we can make other parts of React faster. The ids were used to map back from events to the original React component, meaning we had to do a bunch of work on every event, even though we cached this data heavily. As we&amp;#39;ve all experienced, caching and in particularly invalidating caches, can be error prone and we saw many hard to reproduce issues over the years as a result. Now we can build up a direct mapping at render time since we already have a handle on the node.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;no-more-extra-ltspangts&quot;&gt;&lt;/a&gt;No more extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s &lt;a class=&quot;hash-link&quot; href=&quot;#no-more-extra-ltspangts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Another big change with our DOM interaction is how we render text blocks. Previously you may have noticed that React rendered a lot of extra &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. Eg, in our most basic example on the home page we render &lt;code&gt;&amp;lt;div&amp;gt;Hello {this.props.name}&amp;lt;/div&amp;gt;&lt;/code&gt;, resulting in markup that contained 2 &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. Now we&amp;#39;ll render plain text nodes interspersed with comment nodes that are used for demarcation. This gives us the same ability to update individual pieces of text, without creating extra nested nodes. Very few people have depended on the actual markup generated here so it&amp;#39;s likely you are not impacted. However if you were targeting these &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s in your CSS, you will need to adjust accordingly. You can always render them explicitly in your components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;rendering-null-now-uses-comment-nodes&quot;&gt;&lt;/a&gt;Rendering &lt;code&gt;null&lt;/code&gt; now uses comment nodes &lt;a class=&quot;hash-link&quot; href=&quot;#rendering-null-now-uses-comment-nodes&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We&amp;#39;ve also made use of these comment nodes to change what &lt;code&gt;null&lt;/code&gt; renders to. Rendering to &lt;code&gt;null&lt;/code&gt; was a feature we added in React v0.11 and was implemented by rendering &lt;code&gt;&amp;lt;noscript&amp;gt;&lt;/code&gt; elements. By rendering to comment nodes now, there&amp;#39;s a chance some of your CSS will be targeting the wrong thing, specifically if you are making use of &lt;code&gt;:nth-child&lt;/code&gt; selectors. This, along with the other changes mentioned above, have always been considered implementation details of how React targets the DOM. We believe they are safe changes to make without going through a release with warnings detailing the subtle differences as they are details that should not be depended upon. Additionally, we have seen that these changes have improved React performance for many typical applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h4&gt;&lt;a class=&quot;anchor&quot; name=&quot;improved-svg-support&quot;&gt;&lt;/a&gt;Improved SVG support &lt;a class=&quot;hash-link&quot; href=&quot;#improved-svg-support&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;All SVG tags and attributes are now fully supported. (Uncommon SVG tags are not present on the &lt;code&gt;React.DOM&lt;/code&gt; element helper, but JSX and &lt;code&gt;React.createElement&lt;/code&gt; work on all tag names.) All SVG attributes match their original capitalization and hyphenation as defined in the specification (ex: &lt;code&gt;gradientTransform&lt;/code&gt; must be camel-cased but &lt;code&gt;clip-path&lt;/code&gt; should be hyphenated).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;breaking-changes&quot;&gt;&lt;/a&gt;Breaking changes &lt;a class=&quot;hash-link&quot; href=&quot;#breaking-changes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It&amp;#39;s worth calling out the DOM structure changes above again, in particular the change from &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s. In the course of updating the Facebook codebase, we found a very small amount of code that was depending on the markup that React generated. Some of these cases were integration tests like WebDriver which were doing very specific XPath queries to target nodes. Others were simply tests using &lt;code&gt;ReactDOM.renderToStaticMarkup&lt;/code&gt; and comparing markup. Again, there were a very small number of changes that had to be made, but we don&amp;#39;t want anybody to be blindsided. We encourage everybody to run their test suites when upgrading and consider alternative approaches when possible. One approach that will work for some cases is to explicitly use &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;s in your &lt;code&gt;render&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;These deprecations were introduced in v0.14 with a warning and the APIs are now removed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deprecated APIs removed from &lt;code&gt;React&lt;/code&gt;, specifically &lt;code&gt;findDOMNode&lt;/code&gt;, &lt;code&gt;render&lt;/code&gt;, &lt;code&gt;renderToString&lt;/code&gt;, &lt;code&gt;renderToStaticMarkup&lt;/code&gt;, and &lt;code&gt;unmountComponentAtNode&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Deprecated APIs removed from &lt;code&gt;React.addons&lt;/code&gt;, specifically &lt;code&gt;batchedUpdates&lt;/code&gt; and &lt;code&gt;cloneWithProps&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Deprecated APIs removed from component instances, specifically &lt;code&gt;setProps&lt;/code&gt;, &lt;code&gt;replaceProps&lt;/code&gt;, and &lt;code&gt;getDOMNode&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;new-deprecations-introduced-with-a-warning&quot;&gt;&lt;/a&gt;New deprecations, introduced with a warning &lt;a class=&quot;hash-link&quot; href=&quot;#new-deprecations-introduced-with-a-warning&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each of these changes will continue to work as before with a new warning until the release of React 16 so you can upgrade your code gradually.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;LinkedStateMixin&lt;/code&gt; and &lt;code&gt;valueLink&lt;/code&gt; are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior: &lt;a href=&quot;https://www.npmjs.com/package/react-linked-input&quot;&gt;react-linked-input&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;new-helpful-warnings&quot;&gt;&lt;/a&gt;New helpful warnings &lt;a class=&quot;hash-link&quot; href=&quot;#new-helpful-warnings&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;If you use a minified copy of the &lt;em&gt;development&lt;/em&gt; build, React DOM kindly encourages you to use the faster production build instead.&lt;/li&gt;
&lt;li&gt;React DOM: When specifying a unit-less CSS value as a string, a future version will not add &lt;code&gt;px&lt;/code&gt; automatically. This version now warns in this case (ex: writing &lt;code&gt;style={{width: &amp;#39;300&amp;#39;}}&lt;/code&gt;. (Unitless &lt;em&gt;number&lt;/em&gt; values like &lt;code&gt;width: 300&lt;/code&gt; are unchanged.)&lt;/li&gt;
&lt;li&gt;Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool.&lt;/li&gt;
&lt;li&gt;Elements will now warn when attempting to read &lt;code&gt;ref&lt;/code&gt; and &lt;code&gt;key&lt;/code&gt; from the props.&lt;/li&gt;
&lt;li&gt;React DOM now attempts to warn for mistyped event handlers on DOM elements (ex: &lt;code&gt;onclick&lt;/code&gt; which should be &lt;code&gt;onClick&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;notable-bug-fixes&quot;&gt;&lt;/a&gt;Notable bug fixes &lt;a class=&quot;hash-link&quot; href=&quot;#notable-bug-fixes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed multiple small memory leaks&lt;/li&gt;
&lt;li&gt;Input events are handled more reliably in IE 10 and IE 11; spurious events no longer fire when using a placeholder.&lt;/li&gt;
&lt;li&gt;React DOM now supports the &lt;code&gt;cite&lt;/code&gt; and &lt;code&gt;profile&lt;/code&gt; HTML attributes.&lt;/li&gt;
&lt;li&gt;React DOM now supports the &lt;code&gt;onAnimationStart&lt;/code&gt;, &lt;code&gt;onAnimationEnd&lt;/code&gt;, &lt;code&gt;onAnimationIteration&lt;/code&gt;, &lt;code&gt;onTransitionEnd&lt;/code&gt;, and &lt;code&gt;onInvalid&lt;/code&gt; events. Support for &lt;code&gt;onLoad&lt;/code&gt; has been added to &lt;code&gt;object&lt;/code&gt; elements.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Object.is&lt;/code&gt; is used in a number of places to compare values, which leads to fewer false positives, especially involving &lt;code&gt;NaN&lt;/code&gt;. In particular, this affects the &lt;code&gt;shallowCompare&lt;/code&gt; add-on.&lt;/li&gt;
&lt;li&gt;React DOM now defaults to using DOM attributes instead of properties, which fixes a few edge case bugs. Additionally the nullification of values (ex: &lt;code&gt;href={null}&lt;/code&gt;) now results in the forceful removal, no longer trying to set to the default value used by browsers in the absence of a value.&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2016-03-07T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/03/07/react-v15-rc1.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/03/07/react-v15-rc1.html</guid>
			</item>
		
			<item>
				<title>New Versioning Scheme</title>
				<description>&lt;p&gt;Today we&amp;#39;re announcing that we&amp;#39;re switching to major revisions for React. The current version is 0.14.7. The next release will be: &lt;strong&gt;15.0.0&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This change shouldn&amp;#39;t materially affect most of you. Moving to major semver versions simply helps indicate our commitment to stability and gives us the flexibility to add new backwards-compatible features in minor releases. This means we can have fewer major releases and you won&amp;#39;t have to wait as long to take advantage of improvements to React. Plus, if you&amp;#39;re a component author, this versioning scheme gives you the flexibility to support two major versions of React at the same time so you don&amp;#39;t need to leave anyone behind.&lt;/p&gt;

&lt;p&gt;The core of the React API has been stable for years. Our business as well as many of yours all depend heavily on the use of React as a core piece of our infrastructure. We&amp;#39;re committed to the stability as well as the progress of React going forward.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;bring-everyone-along&quot;&gt;&lt;/a&gt;Bring Everyone Along &lt;a class=&quot;hash-link&quot; href=&quot;#bring-everyone-along&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;React isn&amp;#39;t just a library but an ecosystem. We know that your applications and ours are not just isolated islands of code. It is a network of your own application code, your own open source components and third party libraries that all depend on React.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-1.png&quot; width=&quot;403&quot;&gt;&lt;/p&gt;

&lt;p&gt;Therefore it is important that we don&amp;#39;t just upgrade our own codebases but that we bring our whole community with us. We take the upgrade path very seriously - for everyone.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-poll.png&quot; width=&quot;596&quot;&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;introducing-minor-releases&quot;&gt;&lt;/a&gt;Introducing Minor Releases &lt;a class=&quot;hash-link&quot; href=&quot;#introducing-minor-releases&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ideally everyone could just depend on the latest version of React all the time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-2.png&quot; width=&quot;463&quot;&gt;&lt;/p&gt;

&lt;p&gt;We know that in practice that is not possible. In the future, we expect more new additive APIs rather than breakage of existing ones. By moving to major revisions in the semver scheme, we can release new versions without breaking existing ones.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-3.png&quot; width=&quot;503&quot;&gt;&lt;/p&gt;

&lt;p&gt;That means that if one component needs a new API, there is no need for any of the other components to do any further work. They remain compatible.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;what-happened-to-1.0.0&quot;&gt;&lt;/a&gt;What Happened to 1.0.0? &lt;a class=&quot;hash-link&quot; href=&quot;#what-happened-to-1.0.0&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Part of React&amp;#39;s growth and popularity is that it is stable and performant in production. People have long asked what React v1.0 will look. Technically some breaking changes are important to avoid stagnating, but we still achieve stability by making it easy to upgrade. If major version numbers indicate API stability and engender trust that it can be used in production, then we got there a long time ago. There are too many preconceived notions of what v1.0 is. We&amp;#39;re still following semver. We&amp;#39;re just communicating stability by moving the 0 from the beginning to the end.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;breaking-changes&quot;&gt;&lt;/a&gt;Breaking Changes &lt;a class=&quot;hash-link&quot; href=&quot;#breaking-changes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Minor revision releases will include deprecation warnings and tips for how to upgrade an API or pattern that will be removed or changed in the future.&lt;/p&gt;

&lt;p&gt;We will continue to release &lt;a href=&quot;https://www.youtube.com/watch?v=d0pOgY8__JM&quot;&gt;codemods&lt;/a&gt; for common patterns to make automatic upgrades of your codebase easier.&lt;/p&gt;

&lt;p&gt;Once we&amp;#39;ve reached the end of life for a particular major version, we&amp;#39;ll release a new major version where all deprecated APIs have been removed.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;avoiding-the-major-cliff&quot;&gt;&lt;/a&gt;Avoiding The Major Cliff &lt;a class=&quot;hash-link&quot; href=&quot;#avoiding-the-major-cliff&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you try to upgrade your component to 16.0.0 you might find that your application no longer works if you still have other dependencies. E.g. if Ryan&amp;#39;s and Jed&amp;#39;s components are only compatible with 15.x.x.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-4.png&quot; width=&quot;498&quot;&gt;&lt;/p&gt;

&lt;p&gt;Worst case, you revert back to 15.1.0 for your application. Since you&amp;#39;ll want to use your component, you might also revert that one.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-5.png&quot; width=&quot;493&quot;&gt;&lt;/p&gt;

&lt;p&gt;Of course, Ryan and Jed think the same way. If we&amp;#39;re not careful, we can hit a cliff where nobody upgrades. This has happened to many software project ecosystems in the past.&lt;/p&gt;

&lt;p&gt;Therefore, we&amp;#39;re committed to making it easy for most components and libraries built on top of React to be compatible with two major versions at the same time. We will do this by introducing new APIs before completely removing the old ones, thereby avoiding those cliffs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/react/img/blog/versioning-6.png&quot; width=&quot;493&quot;&gt;&lt;/p&gt;
</description>
				<pubDate>2016-02-19T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/02/19/new-versioning-scheme.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/02/19/new-versioning-scheme.html</guid>
			</item>
		
			<item>
				<title>Discontinuing IE 8 Support in React DOM</title>
				<description>&lt;p&gt;Since its 2013 release, React has supported all popular browsers, including Internet Explorer 8 and above. We handle normalizing many quirks present in old browser versions, including event system differences, so that your app code doesn&amp;#39;t have to worry about most browser bugs.&lt;/p&gt;

&lt;p&gt;Today, Microsoft &lt;a href=&quot;https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE-support&quot;&gt;discontinued support for older versions of IE&lt;/a&gt;. Starting with React v15, we&amp;#39;re discontinuing React DOM&amp;#39;s support for IE 8. We&amp;#39;ve heard that most React DOM apps already don&amp;#39;t support old versions of Internet Explorer, so this shouldn&amp;#39;t affect many people. This change will help us develop faster and make React DOM even better. (We won&amp;#39;t actively remove IE 8–related code quite yet, but we will deprioritize new bugs that are reported. If you need to support IE 8 we recommend you stay on React v0.14.)&lt;/p&gt;

&lt;p&gt;React DOM will continue to support IE 9 and above for the foreseeable future.&lt;/p&gt;
</description>
				<pubDate>2016-01-12T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/01/12/discontinuing-ie8-support.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/01/12/discontinuing-ie8-support.html</guid>
			</item>
		
			<item>
				<title>(A =&gt; B) !=&gt; (B =&gt; A)</title>
				<description>&lt;p&gt;The documentation for &lt;code&gt;componentWillReceiveProps&lt;/code&gt; states that &lt;code&gt;componentWillReceiveProps&lt;/code&gt; will be invoked when the props change as the result of a rerender. Some people assume this means &amp;quot;if &lt;code&gt;componentWillReceiveProps&lt;/code&gt; is called, then the props must have changed&amp;quot;, but that conclusion is logically incorrect.&lt;/p&gt;

&lt;p&gt;The guiding principle is one of my favorites from formal logic/mathematics:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A implies B does not imply B implies A&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example: &amp;quot;If I eat moldy food, then I will get sick&amp;quot; does not imply &amp;quot;if I am sick, then I must have eaten moldy food&amp;quot;. There are many other reasons I could be feeling sick. For instance, maybe the flu is circulating around the office. Similarly, there are many reasons that &lt;code&gt;componentWillReceiveProps&lt;/code&gt; might get called, even if the props didn’t change.&lt;/p&gt;

&lt;p&gt;If you don’t believe me, call &lt;code&gt;ReactDOM.render()&lt;/code&gt; three times with the exact same props, and try to predict the number of times &lt;code&gt;componentWillReceiveProps&lt;/code&gt; will get called:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;componentWillReceiveProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;componentWillReceiveProps&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nextProps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Bar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/div&amp;gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;container&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;drinks&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this case, the answer is &amp;quot;2&amp;quot;. React calls &lt;code&gt;componentWillReceiveProps&lt;/code&gt; twice (once for each of the two updates). Both times, the value of &amp;quot;drinks&amp;quot; is printed (ie. the props didn’t change).&lt;/p&gt;

&lt;p&gt;To understand why, we need to think about what &lt;em&gt;could&lt;/em&gt; have happened. The data &lt;em&gt;could&lt;/em&gt; have changed between the initial render and the two subsequent updates, if the code had performed a mutation like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;drinks&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;food&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;noise&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mydata&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;React has no way of knowing that the data didn’t change. Therefore, React needs to call &lt;code&gt;componentWillReceiveProps&lt;/code&gt;, because the component needs to be notified of the new props (even if the new props happen to be the same as the old props).&lt;/p&gt;

&lt;p&gt;You might think that React could just use smarter checks for equality, but there are some issues with this idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The old &lt;code&gt;mydata&lt;/code&gt; and the new &lt;code&gt;mydata&lt;/code&gt; are actually the same physical object (only the object’s internal value changed). Since the references are triple-equals-equal, doing an equality check doesn’t tell us if the value has changed. The only possible solution would be to have created a deep copy of the data, and then later do a deep comparison - but this can be prohibitively expensive for large data structures (especially ones with cycles).&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;mydata&lt;/code&gt; object might contain references to functions which have captured variables within closures. There is no way for React to peek into these closures, and thus no way for React to copy them and/or verify equality.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;mydata&lt;/code&gt; object might contain references to objects which are re-instantiated during the parent&amp;#39;s render (ie. not triple-equals-equal) but are conceptually equal (ie. same keys and same values). A deep-compare (expensive) could detect this, except that functions present a problem again because there is no reliable way to compare two functions to see if they are semantically equivalent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given the language constraints, it is sometimes impossible for us to achieve meaningful equality semantics. In such cases, React will call &lt;code&gt;componentWillReceiveProps&lt;/code&gt; (even though the props might not have changed) so the component has an opportunity to examine the new props and act accordingly.&lt;/p&gt;

&lt;p&gt;As a result, your implementation of &lt;code&gt;componentWillReceiveProps&lt;/code&gt; MUST NOT assume that your props have changed. If you want an operation (such as a network request) to occur only when props have changed, your &lt;code&gt;componentWillReceiveProps&lt;/code&gt; code needs to check to see if the props actually changed.&lt;/p&gt;
</description>
				<pubDate>2016-01-08T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html</guid>
			</item>
		
			<item>
				<title>React v0.14.4</title>
				<description>&lt;p&gt;Happy December! We have a minor point release today. It has just a few small bug fixes.&lt;/p&gt;

&lt;p&gt;The release is now available for download:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-0.14.4.js&quot;&gt;https://fb.me/react-0.14.4.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-0.14.4.min.js&quot;&gt;https://fb.me/react-0.14.4.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React with Add-Ons&lt;/strong&gt;&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-with-addons-0.14.4.js&quot;&gt;https://fb.me/react-with-addons-0.14.4.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-with-addons-0.14.4.min.js&quot;&gt;https://fb.me/react-with-addons-0.14.4.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM&lt;/strong&gt; (include React in the page before React DOM)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-0.14.4.js&quot;&gt;https://fb.me/react-dom-0.14.4.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-0.14.4.min.js&quot;&gt;https://fb.me/react-dom-0.14.4.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React DOM Server&lt;/strong&gt; (include React in the page before React DOM Server)&lt;br&gt;
Dev build with warnings: &lt;a href=&quot;https://fb.me/react-dom-server-0.14.4.js&quot;&gt;https://fb.me/react-dom-server-0.14.4.js&lt;/a&gt;&lt;br&gt;
Minified build for production: &lt;a href=&quot;https://fb.me/react-dom-server-0.14.4.min.js&quot;&gt;https://fb.me/react-dom-server-0.14.4.min.js&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We&amp;#39;ve also published version &lt;code&gt;0.14.4&lt;/code&gt; of the &lt;code&gt;react&lt;/code&gt;, &lt;code&gt;react-dom&lt;/code&gt;, and addons packages on npm and the &lt;code&gt;react&lt;/code&gt; package on bower.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;changelog&quot;&gt;&lt;/a&gt;Changelog &lt;a class=&quot;hash-link&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react&quot;&gt;&lt;/a&gt;React &lt;a class=&quot;hash-link&quot; href=&quot;#react&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Minor internal changes for better compatibility with React Native&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-dom&quot;&gt;&lt;/a&gt;React DOM &lt;a class=&quot;hash-link&quot; href=&quot;#react-dom&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;autoCapitalize&lt;/code&gt; and &lt;code&gt;autoCorrect&lt;/code&gt; props are now set as attributes in the DOM instead of properties to improve cross-browser compatibility&lt;/li&gt;
&lt;li&gt;Fixed bug with controlled &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; elements not handling updates properly&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;react-perf-add-on&quot;&gt;&lt;/a&gt;React Perf Add-on &lt;a class=&quot;hash-link&quot; href=&quot;#react-perf-add-on&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Some DOM operation names have been updated for clarity in the output of &lt;code&gt;.printDOM()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>2015-12-29T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2015/12/29/react-v0.14.4.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2015/12/29/react-v0.14.4.html</guid>
			</item>
		
			<item>
				<title>React Components, Elements, and Instances</title>
				<description>&lt;p&gt;The difference between &lt;strong&gt;components, their instances, and elements&lt;/strong&gt; confuses many React beginners. Why are there three different terms to refer to something that is painted on screen?&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;managing-the-instances&quot;&gt;&lt;/a&gt;Managing the Instances &lt;a class=&quot;hash-link&quot; href=&quot;#managing-the-instances&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you’re new to React, you probably only worked with component classes and instances before. For example, you may declare a &lt;code&gt;Button&lt;/code&gt; &lt;em&gt;component&lt;/em&gt; by creating a class. When the app is running, you may have several &lt;em&gt;instances&lt;/em&gt; of this component on screen, each with its own properties and local state. This is the traditional object-oriented UI programming. Why introduce &lt;em&gt;elements&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;In this traditional UI model, it is up to you to take care of creating and destroying child component instances. If a &lt;code&gt;Form&lt;/code&gt; component wants to render a &lt;code&gt;Button&lt;/code&gt; component, it needs to create its instance, and manually keep it up to date with any new information.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Form&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;TraditionalObjectOrientedView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// Read some data passed to the view&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// Form is not yet submitted. Create the button!&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// The button is visible. Update its text!&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// Form was submitted. Destroy the button!&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;destroy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// Form was submitted. Show the success message!&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Success!&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;el&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is pseudocode, but it is more or less what you end up with when you write composite UI code that behaves consistently in an object-oriented way using a library like Backbone.&lt;/p&gt;

&lt;p&gt;Each component instance has to keep references to its DOM node and to the instances of the children components, and create, update, and destroy them when the time is right. The lines of code grow as the square of the number of possible states of the component, and the parents have direct access to their children component instances, making it hard to decouple them in the future.&lt;/p&gt;

&lt;p&gt;So how is React different?&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;elements-describe-the-tree&quot;&gt;&lt;/a&gt;Elements Describe the Tree &lt;a class=&quot;hash-link&quot; href=&quot;#elements-describe-the-tree&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In React, this is where the &lt;em&gt;elements&lt;/em&gt; come to rescue. &lt;strong&gt;An element is a plain object &lt;em&gt;describing&lt;/em&gt; a component instance or DOM node and its desired properties.&lt;/strong&gt; It contains only information about the component type (for example, a &lt;code&gt;Button&lt;/code&gt;), its properties (for example, its &lt;code&gt;color&lt;/code&gt;), and any child elements inside it.&lt;/p&gt;

&lt;p&gt;An element is not an actual instance. Rather, it is a way to tell React what you &lt;em&gt;want&lt;/em&gt; to see on the screen. You can’t call any methods on the element. It’s just an immutable description object with two fields: &lt;code&gt;type: (string | ReactClass)&lt;/code&gt; and &lt;code&gt;props: Object&lt;/code&gt;&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;dom-elements&quot;&gt;&lt;/a&gt;DOM Elements &lt;a class=&quot;hash-link&quot; href=&quot;#dom-elements&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When an element’s &lt;code&gt;type&lt;/code&gt; is a string, it represents a DOM node with that tag name, and &lt;code&gt;props&lt;/code&gt; correspond to its attributes. This is what React will render. For example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This element is just a way to represent the following HTML as a plain object:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot; data-lang=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;button button-blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;b&amp;gt;&lt;/span&gt;
    OK!
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/b&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note how elements can be nested. By convention, when we want to create an element tree, we specify one or more child elements as the &lt;code&gt;children&lt;/code&gt; prop of their containing element.&lt;/p&gt;

&lt;p&gt;What’s important is that both child and parent elements are &lt;em&gt;just descriptions and not the actual instances&lt;/em&gt;. They don’t refer to anything on the screen when you create them. You can create them and throw them away, and it won’t matter much.&lt;/p&gt;

&lt;p&gt;React elements are easy to traverse, don’t need to be parsed, and of course they are much lighter than the actual DOM elements—they’re just objects!&lt;/p&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;component-elements&quot;&gt;&lt;/a&gt;Component Elements &lt;a class=&quot;hash-link&quot; href=&quot;#component-elements&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;However, the &lt;code&gt;type&lt;/code&gt; of an element can also be a function or a class corresponding to a React component:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is the core idea of React.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An element describing a component is also an element, just like an element describing the DOM node. They can be nested and mixed with each other.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This feature lets you define a &lt;code&gt;DangerButton&lt;/code&gt; component as a &lt;code&gt;Button&lt;/code&gt; with a specific &lt;code&gt;color&lt;/code&gt; property value without worrying about whether &lt;code&gt;Button&lt;/code&gt; renders to a DOM &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, or something else entirely:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DangerButton&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;red&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can mix and match DOM and component elements in a single element tree:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DeleteAccount&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;p&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Are you sure?&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DangerButton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Yep&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Cancel&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
   &lt;span class=&quot;p&quot;&gt;}]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or, if you prefer JSX:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DeleteAccount&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Are&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;you&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sure&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;?&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/p&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DangerButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Yep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/DangerButton&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Cancel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/Button&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This mix and matching helps keep components decoupled from each other, as they can express both &lt;em&gt;is-a&lt;/em&gt; and &lt;em&gt;has-a&lt;/em&gt; relationships exclusively through composition:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Button&lt;/code&gt; is a DOM &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; with specific properties.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DangerButton&lt;/code&gt; is a &lt;code&gt;Button&lt;/code&gt; with specific properties.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DeleteAccount&lt;/code&gt; contains a &lt;code&gt;Button&lt;/code&gt; and a &lt;code&gt;DangerButton&lt;/code&gt; inside a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;components-encapsulate-element-trees&quot;&gt;&lt;/a&gt;Components Encapsulate Element Trees &lt;a class=&quot;hash-link&quot; href=&quot;#components-encapsulate-element-trees&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When React sees an element with a function or class &lt;code&gt;type&lt;/code&gt;, it knows to ask &lt;em&gt;that&lt;/em&gt; component what element it renders to, given the corresponding &lt;code&gt;props&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When it sees this element:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;React will ask &lt;code&gt;Button&lt;/code&gt; what it renders to. The &lt;code&gt;Button&lt;/code&gt; will return this element:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;React will repeat this process until it knows the underlying DOM tag elements for every component on the page.&lt;/p&gt;

&lt;p&gt;React is like a child asking “what is Y” for every “X is Y” you explain to them until they figure out every little thing in the world.&lt;/p&gt;

&lt;p&gt;Remember the &lt;code&gt;Form&lt;/code&gt; example above? It can be written in React as follows&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Form&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// Form submitted! Return a message element.&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Success!&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// Form is still visible! Return a button element.&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That’s it! For a React component, props are the input, and an element tree is the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The returned element tree can contain both elements describing DOM nodes, and elements describing other components. This lets you compose independent parts of UI without relying on their internal DOM structure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We let React create, update, and destroy instances. We &lt;em&gt;describe&lt;/em&gt; them with elements we return from the components, and React takes care of managing the instances.&lt;/p&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;components-can-be-classes-or-functions&quot;&gt;&lt;/a&gt;Components Can Be Classes or Functions &lt;a class=&quot;hash-link&quot; href=&quot;#components-can-be-classes-or-functions&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the code above, &lt;code&gt;Form&lt;/code&gt;, &lt;code&gt;Message&lt;/code&gt;, and &lt;code&gt;Button&lt;/code&gt; are React components. They can either be written as functions, like above, or as classes descending from &lt;code&gt;React.Component&lt;/code&gt;. These three ways to declare a component are mostly equivalent:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// 1) As a function of props&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// 2) Using the React.createClass() factory&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// 3) As an ES6 class descending from React.Component&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Component&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When a component is defined as a class, it is a little bit more powerful than a functional component. It can store some local state and perform custom logic when the corresponding DOM node is created or destroyed.&lt;/p&gt;

&lt;p&gt;A functional component is less powerful but is simpler, and acts like a class component with just a single &lt;code&gt;render()&lt;/code&gt; method. Unless you need features available only in a class, we encourage you to use functional components instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;However, whether functions or classes, fundamentally they are all components to React. They take the props as their input, and return the elements as their output.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a class=&quot;anchor&quot; name=&quot;top-down-reconciliation&quot;&gt;&lt;/a&gt;Top-Down Reconciliation &lt;a class=&quot;hash-link&quot; href=&quot;#top-down-reconciliation&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you call:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;nx&quot;&gt;ReactDOM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;root&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;React will ask the &lt;code&gt;Form&lt;/code&gt; component what element tree it returns, given those &lt;code&gt;props&lt;/code&gt;. It will gradually “refine” its understanding of your component tree in terms of simpler primitives:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// React: You told me this...&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;isSubmitted&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;buttonText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// React: ...And Form told me this...&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// React: ...and Button told me this! I guess I&amp;#39;m done.&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;button button-blue&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;OK!&amp;#39;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is a part of the process that React calls &lt;a href=&quot;/react/docs/reconciliation.html&quot;&gt;reconciliation&lt;/a&gt; which starts when you call &lt;a href=&quot;/react/docs/top-level-api.html#reactdom.render&quot;&gt;&lt;code&gt;ReactDOM.render()&lt;/code&gt;&lt;/a&gt; or &lt;a href=&quot;/react/docs/component-api.html#setstate&quot;&gt;&lt;code&gt;setState()&lt;/code&gt;&lt;/a&gt;. By the end of the reconciliation, React knows the result DOM tree, and a renderer like &lt;code&gt;react-dom&lt;/code&gt; or &lt;code&gt;react-native&lt;/code&gt; applies the minimal set of changes necessary to update the DOM nodes (or the platform-specific views in case of React Native).&lt;/p&gt;

&lt;p&gt;This gradual refining process is also the reason React apps are easy to optimize. If some parts of your component tree become too large for React to visit efficiently, you can tell it to &lt;a href=&quot;/react/docs/advanced-performance.html&quot;&gt;skip this “refining” and diffing certain parts of the tree if the relevant props have not changed&lt;/a&gt;. It is very fast to calculate whether the props have changed if they are immutable, so React and immutability work great together, and can provide great optimizations with the minimal effort.&lt;/p&gt;

&lt;p&gt;You might have noticed that this blog entry talks a lot about components and elements, and not so much about the instances. The truth is, instances have much less importance in React than in most object-oriented UI frameworks.&lt;/p&gt;

&lt;p&gt;Only components declared as classes have instances, and you never create them directly: React does that for you. While &lt;a href=&quot;/react/docs/more-about-refs.html&quot;&gt;mechanisms for a parent component instance to access a child component instance&lt;/a&gt; exist, they are only used for imperative actions (such as setting focus on a field), and should generally be avoided.&lt;/p&gt;

&lt;p&gt;React takes care of creating an instance for every class component, so you can write components in an object-oriented way with methods and local state, but other than that, instances are not very important in the React’s programming model and are managed by React itself.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;summary&quot;&gt;&lt;/a&gt;Summary &lt;a class=&quot;hash-link&quot; href=&quot;#summary&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An &lt;em&gt;element&lt;/em&gt; is a plain object describing what you want to appear on the screen in terms of the DOM nodes or other components. Elements can contain other elements in their props. Creating a React element is cheap. Once an element is created, it is never mutated.&lt;/p&gt;

&lt;p&gt;A &lt;em&gt;component&lt;/em&gt; can be declared in several different ways. It can be a class with a &lt;code&gt;render()&lt;/code&gt; method. Alternatively, in simple cases, it can be defined as a function. In either case, it takes props as an input, and returns an element tree as the output.&lt;/p&gt;

&lt;p&gt;When a component receives some props as an input, it is because a particular parent component returned an element with its &lt;code&gt;type&lt;/code&gt; and these props. This is why people say that the props flows one way in React: from parents to children.&lt;/p&gt;

&lt;p&gt;An &lt;em&gt;instance&lt;/em&gt; is what you refer to as &lt;code&gt;this&lt;/code&gt; in the component class you write. It is useful for &lt;a href=&quot;/react/docs/component-api.html&quot;&gt;storing local state and reacting to the lifecycle events&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Functional components don’t have instances at all. Class components have instances, but you never need to create a component instance directly—React takes care of this.&lt;/p&gt;

&lt;p&gt;Finally, to create elements, use &lt;a href=&quot;/react/docs/top-level-api.html#react.createelement&quot;&gt;&lt;code&gt;React.createElement()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;/react/docs/jsx-in-depth.html&quot;&gt;JSX&lt;/a&gt;, or an &lt;a href=&quot;/react/docs/top-level-api.html#react.createfactory&quot;&gt;element factory helper&lt;/a&gt;. Don’t write elements as plain objects in the real code—just know that they are plain objects under the hood.&lt;/p&gt;
&lt;h2&gt;&lt;a class=&quot;anchor&quot; name=&quot;further-reading&quot;&gt;&lt;/a&gt;Further Reading &lt;a class=&quot;hash-link&quot; href=&quot;#further-reading&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/react/blog/2014/10/14/introducing-react-elements.html&quot;&gt;Introducing React Elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/react/blog/2015/02/24/streamlining-react-elements.html&quot;&gt;Streamlining React Elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/react/docs/glossary.html&quot;&gt;React (Virtual) DOM Terminology&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;All React elements require an additional &lt;code&gt;$$typeof: Symbol.for(&amp;#39;react.element&amp;#39;)&lt;/code&gt; field declared on the object for &lt;a href=&quot;https://github.com/facebook/react/pull/4832&quot;&gt;security reasons&lt;/a&gt;. It is omitted in the examples above. This blog entry uses inline objects for elements to give you an idea of what’s happening underneath but the code won’t run as is unless you either add &lt;code&gt;$$typeof&lt;/code&gt; to the elements, or change the code to use &lt;code&gt;React.createElement()&lt;/code&gt; or JSX.&amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</description>
				<pubDate>2015-12-18T00:00:00-08:00</pubDate>
				<link>https://facebook.github.io/react/blog/2015/12/18/react-components-elements-and-instances.html</link>
				<guid isPermaLink="true">https://facebook.github.io/react/blog/2015/12/18/react-components-elements-and-instances.html</guid>
			</item>
		
	</channel>
</rss>
