mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
490 lines
32 KiB
HTML
490 lines
32 KiB
HTML
<!DOCTYPE html>
|
||
<!--[if IE]><![endif]-->
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<title>Blog | React</title>
|
||
<meta name="viewport" content="width=device-width">
|
||
<meta property="og:title" content="Blog | React">
|
||
<meta property="og:type" content="website">
|
||
<meta property="og:url" content="https://facebook.github.io/react/blog/index.html">
|
||
<meta property="og:image" content="https://facebook.github.io/react/img/logo_og.png">
|
||
<meta property="og:description" content="A JavaScript library for building user interfaces">
|
||
<meta property="fb:app_id" content="623268441017527">
|
||
|
||
<link rel="shortcut icon" href="/react/favicon.ico">
|
||
<link rel="alternate" type="application/rss+xml" title="React" href="https://facebook.github.io/react/feed.xml">
|
||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
|
||
<link rel="stylesheet" href="/react/css/syntax.css">
|
||
<link rel="stylesheet" href="/react/css/codemirror.css">
|
||
<link rel="stylesheet" href="/react/css/react.css">
|
||
|
||
<script src="//use.typekit.net/vqa1hcx.js"></script>
|
||
<script>try{Typekit.load();}catch(e){}</script>
|
||
|
||
<!--[if lte IE 8]>
|
||
<script src="/react/js/html5shiv.min.js"></script>
|
||
<script src="/react/js/es5-shim.min.js"></script>
|
||
<script src="/react/js/es5-sham.min.js"></script>
|
||
<![endif]-->
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
|
||
<script src="/react/js/codemirror.js"></script>
|
||
<script src="/react/js/javascript.js"></script>
|
||
<script src="/react/js/react.js"></script>
|
||
<script src="/react/js/react-dom.js"></script>
|
||
<script src="/react/js/babel-browser.min.js"></script>
|
||
<script src="/react/js/live_editor.js"></script>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="container">
|
||
|
||
<div class="nav-main">
|
||
<div class="wrap">
|
||
<a class="nav-home" href="/react/index.html">
|
||
<img class="nav-logo" src="/react/img/logo.svg" width="36" height="36">
|
||
React
|
||
</a>
|
||
<ul class="nav-site nav-site-internal">
|
||
<li><a href="/react/docs/getting-started.html">Docs</a></li>
|
||
<li><a href="/react/support.html">Support</a></li>
|
||
<li><a href="/react/downloads.html">Download</a></li>
|
||
<li><a href="/react/blog/" class="active">Blog</a></li>
|
||
<li>
|
||
<input id="algolia-doc-search" type="text" placeholder="Search docs..." />
|
||
</li>
|
||
</ul>
|
||
|
||
<ul class="nav-site nav-site-external">
|
||
<li><a href="https://github.com/facebook/react">GitHub</a></li>
|
||
<li><a href="https://facebook.github.io/react-native/">React Native</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<section class="content wrap blogContent">
|
||
<div class="nav-docs nav-blog">
|
||
<div class="nav-docs-section">
|
||
<h3>Recent posts</h3>
|
||
<ul>
|
||
|
||
<li><a href="/react/blog/2016/03/29/react-v0.14.8.html">React v0.14.8</a></li>
|
||
|
||
<li><a href="/react/blog/2016/03/16/react-v15-rc2.html">React v15.0 Release Candidate 2</a></li>
|
||
|
||
<li><a href="/react/blog/2016/03/07/react-v15-rc1.html">React v15.0 Release Candidate</a></li>
|
||
|
||
<li><a href="/react/blog/2016/02/19/new-versioning-scheme.html">New Versioning Scheme</a></li>
|
||
|
||
<li><a href="/react/blog/2016/01/12/discontinuing-ie8-support.html">Discontinuing IE 8 Support in React DOM</a></li>
|
||
|
||
<li><a href="/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html">(A => B) !=> (B => A)</a></li>
|
||
|
||
<li><a href="/react/blog/2015/12/29/react-v0.14.4.html">React v0.14.4</a></li>
|
||
|
||
<li><a href="/react/blog/2015/12/18/react-components-elements-and-instances.html">React Components, Elements, and Instances</a></li>
|
||
|
||
<li><a href="/react/blog/2015/12/16/ismounted-antipattern.html">isMounted is an Antipattern</a></li>
|
||
|
||
<li><a href="/react/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.html">React.js Conf 2016 Diversity Scholarship</a></li>
|
||
|
||
<li><a href="/react/blog/all.html">All posts ...</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="inner-content">
|
||
|
||
<div class="post-list-item">
|
||
|
||
|
||
<h1>
|
||
|
||
<a href="/react/blog/2016/03/29/react-v0.14.8.html">React v0.14.8</a>
|
||
|
||
</h1>
|
||
|
||
<p class="meta">
|
||
March 29, 2016
|
||
by
|
||
|
||
|
||
<a href="https://twitter.com/dan_abramov">Dan Abramov</a>
|
||
|
||
|
||
|
||
</p>
|
||
|
||
<hr>
|
||
|
||
<div class="post">
|
||
<p>We have already released two release candidates for React 15, and the final version is coming soon.</p>
|
||
|
||
<p>However <a href="https://github.com/iancmyers">Ian Christian Myers</a> discovered a memory leak related to server rendering in React 0.14 and <a href="https://github.com/facebook/react/pull/6060">contributed a fix</a>. 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.</p>
|
||
|
||
<p>The release is now available for download:</p>
|
||
|
||
<ul>
|
||
<li><strong>React</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-0.14.8.js">https://fb.me/react-0.14.8.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-0.14.8.min.js">https://fb.me/react-0.14.8.min.js</a><br></li>
|
||
<li><strong>React with Add-Ons</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-with-addons-0.14.8.js">https://fb.me/react-with-addons-0.14.8.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-with-addons-0.14.8.min.js">https://fb.me/react-with-addons-0.14.8.min.js</a><br></li>
|
||
<li><strong>React DOM</strong> (include React in the page before React DOM)<br>
|
||
Dev build with warnings: <a href="https://fb.me/react-dom-0.14.8.js">https://fb.me/react-dom-0.14.8.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-dom-0.14.8.min.js">https://fb.me/react-dom-0.14.8.min.js</a><br></li>
|
||
<li><strong>React DOM Server</strong> (include React in the page before React DOM Server)<br>
|
||
Dev build with warnings: <a href="https://fb.me/react-dom-server-0.14.8.js">https://fb.me/react-dom-server-0.14.8.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-dom-server-0.14.8.min.js">https://fb.me/react-dom-server-0.14.8.min.js</a></li>
|
||
</ul>
|
||
|
||
<p>We've also published version <code>0.14.8</code> of the <code>react</code>, <code>react-dom</code>, and addons packages on npm and the <code>react</code> package on bower.</p>
|
||
|
||
<hr>
|
||
<h2><a class="anchor" name="changelog"></a>Changelog <a class="hash-link" href="#changelog">#</a></h2><h3><a class="anchor" name="react"></a>React <a class="hash-link" href="#react">#</a></h3>
|
||
<ul>
|
||
<li>Fixed memory leak when rendering on the server</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="post-list-item">
|
||
|
||
|
||
<h1>
|
||
|
||
<a href="/react/blog/2016/03/16/react-v15-rc2.html">React v15.0 Release Candidate 2</a>
|
||
|
||
</h1>
|
||
|
||
<p class="meta">
|
||
March 16, 2016
|
||
by
|
||
|
||
|
||
<a href="https://twitter.com/zpao">Paul O’Shannessy</a>
|
||
|
||
|
||
|
||
</p>
|
||
|
||
<hr>
|
||
|
||
<div class="post">
|
||
<p>Today we'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.</p>
|
||
|
||
<p>The most pressing change that was made is to fix a bug in our new code that removes <code><span></code>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't break out of the optimization for <code>DocumentFragment</code>s, resulting in text not appearing at all. Thanks to the several people who <a href="https://github.com/facebook/react/issues/6246">reported this</a>.</p>
|
||
|
||
<p>The other change is to our SVG code. In RC1 we had made the decision to pass through all attributes directly. This led to <a href="https://github.com/facebook/react/issues/6211">some confusion with <code>class</code> vs <code>className</code></a> 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 <em>might</em> 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 <a href="https://github.com/facebook/react/issues/1657#issuecomment-197031403">let us know</a> if we missed anything. It was and still is our intent to support the full range of SVG tags and attributes in this release.</p>
|
||
|
||
<p>Thanks again to everybody who has tried the RC1 and reported issues. It has been extremely important and we wouldn't be able to do this without your help!</p>
|
||
<h2><a class="anchor" name="installation"></a>Installation <a class="hash-link" href="#installation">#</a></h2>
|
||
<p>We recommend using React from <code>npm</code> and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:</p>
|
||
|
||
<ul>
|
||
<li><code>npm install --save react@15.0.0-rc.2 react-dom@15.0.0-rc.2</code></li>
|
||
</ul>
|
||
|
||
<p>Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the <code>NODE_ENV</code> environment variable to <code>production</code> to use the production build of React which does not include the development warnings and runs significantly faster.</p>
|
||
|
||
<p>If you can’t use <code>npm</code> yet, we provide pre-built browser builds for your convenience, which are also available in the <code>react</code> package on bower.</p>
|
||
|
||
<ul>
|
||
<li><strong>React</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-15.0.0-rc.2.js">https://fb.me/react-15.0.0-rc.2.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-15.0.0-rc.2.min.js">https://fb.me/react-15.0.0-rc.2.min.js</a><br></li>
|
||
<li><strong>React with Add-Ons</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-with-addons-15.0.0-rc.2.js">https://fb.me/react-with-addons-15.0.0-rc.2.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-with-addons-15.0.0-rc.2.min.js">https://fb.me/react-with-addons-15.0.0-rc.2.min.js</a><br></li>
|
||
<li><strong>React DOM</strong> (include React in the page before React DOM)<br>
|
||
Dev build with warnings: <a href="https://fb.me/react-dom-15.0.0-rc.2.js">https://fb.me/react-dom-15.0.0-rc.2.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-dom-15.0.0-rc.2.min.js">https://fb.me/react-dom-15.0.0-rc.2.min.js</a><br></li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="post-list-item">
|
||
|
||
|
||
<h1>
|
||
|
||
<a href="/react/blog/2016/03/07/react-v15-rc1.html">React v15.0 Release Candidate</a>
|
||
|
||
</h1>
|
||
|
||
<p class="meta">
|
||
March 7, 2016
|
||
by
|
||
|
||
|
||
<a href="https://twitter.com/zpao">Paul O’Shannessy</a>
|
||
|
||
|
||
|
||
</p>
|
||
|
||
<hr>
|
||
|
||
<div class="post">
|
||
<p>Sorry for the small delay in releasing this. As we said, we've been busy binge-watching House of Cards. That scene in the last episode where Francis and Claire Underwood <abbr title="You didn't think we would actually spoil anything did you?">████████████████████████████████████</abbr>. WOW!</p>
|
||
|
||
<p>But now we're ready, so without further ado, we're shipping a release candidate for React v15 now. As a reminder, <a href="/react/blog/2016/02/19/new-versioning-scheme.html">we're switching to major versions</a> 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 <a href="/react/blog/2016/01/12/discontinuing-ie8-support.html">we no longer actively support Internet Explorer 8</a>. 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.</p>
|
||
|
||
<p>Please try it out before we publish the final release. Let us know if you run into any problems by filing issues on our <a href="https://github.com/facebook/react">GitHub repo</a>.</p>
|
||
<h2><a class="anchor" name="upgrade-guide"></a>Upgrade Guide <a class="hash-link" href="#upgrade-guide">#</a></h2>
|
||
<p>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.</p>
|
||
|
||
<p>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.</p>
|
||
|
||
<p>See the changelog below for more details.</p>
|
||
<h2><a class="anchor" name="installation"></a>Installation <a class="hash-link" href="#installation">#</a></h2>
|
||
<p>We recommend using React from <code>npm</code> and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:</p>
|
||
|
||
<ul>
|
||
<li><code>npm install --save react@15.0.0-rc.1 react-dom@15.0.0-rc.1</code></li>
|
||
</ul>
|
||
|
||
<p>Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the <code>NODE_ENV</code> environment variable to <code>production</code> to use the production build of React which does not include the development warnings and runs significantly faster.</p>
|
||
|
||
<p>If you can’t use <code>npm</code> yet, we provide pre-built browser builds for your convenience, which are also available in the <code>react</code> package on bower.</p>
|
||
|
||
<ul>
|
||
<li><strong>React</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-15.0.0-rc.1.js">https://fb.me/react-15.0.0-rc.1.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-15.0.0-rc.1.min.js">https://fb.me/react-15.0.0-rc.1.min.js</a><br></li>
|
||
<li><strong>React with Add-Ons</strong><br>
|
||
Dev build with warnings: <a href="https://fb.me/react-with-addons-15.0.0-rc.1.js">https://fb.me/react-with-addons-15.0.0-rc.1.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-with-addons-15.0.0-rc.1.min.js">https://fb.me/react-with-addons-15.0.0-rc.1.min.js</a><br></li>
|
||
<li><strong>React DOM</strong> (include React in the page before React DOM)<br>
|
||
Dev build with warnings: <a href="https://fb.me/react-dom-15.0.0-rc.1.js">https://fb.me/react-dom-15.0.0-rc.1.js</a><br>
|
||
Minified build for production: <a href="https://fb.me/react-dom-15.0.0-rc.1.min.js">https://fb.me/react-dom-15.0.0-rc.1.min.js</a><br></li>
|
||
</ul>
|
||
<h2><a class="anchor" name="changelog"></a>Changelog <a class="hash-link" href="#changelog">#</a></h2><h3><a class="anchor" name="major-changes"></a>Major changes <a class="hash-link" href="#major-changes">#</a></h3>
|
||
<ul>
|
||
<li><h4><a class="anchor" name="document.createelement-is-in-and-data-reactid-is-out"></a><code>document.createElement</code> is in and <code>data-reactid</code> is out <a class="hash-link" href="#document.createelement-is-in-and-data-reactid-is-out">#</a></h4>
|
||
<p>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 <code>data-reactid</code> 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 <code>document.createElement</code> on initial render. Previously we would generate a large string of HTML and then set <code>node.innerHTML</code>. At the time, this was decided to be faster than using <code>document.createElement</code> 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 <code>createElement</code> 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.</p></li>
|
||
<li><h4><a class="anchor" name="no-more-extra-ltspangts"></a>No more extra <code><span></code>s <a class="hash-link" href="#no-more-extra-ltspangts">#</a></h4>
|
||
<p>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 <code><span></code>s. Eg, in our most basic example on the home page we render <code><div>Hello {this.props.name}</div></code>, resulting in markup that contained 2 <code><span></code>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 <code><span></code>s in your CSS, you will need to adjust accordingly. You can always render them explicitly in your components.</p></li>
|
||
<li><h4><a class="anchor" name="rendering-null-now-uses-comment-nodes"></a>Rendering <code>null</code> now uses comment nodes <a class="hash-link" href="#rendering-null-now-uses-comment-nodes">#</a></h4>
|
||
<p>We've also made use of these comment nodes to change what <code>null</code> renders to. Rendering to <code>null</code> was a feature we added in React v0.11 and was implemented by rendering <code><noscript></code> 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 <code>:nth-child</code> 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.</p></li>
|
||
<li><h4><a class="anchor" name="improved-svg-support"></a>Improved SVG support <a class="hash-link" href="#improved-svg-support">#</a></h4>
|
||
<p>All SVG tags and attributes are now fully supported. (Uncommon SVG tags are not present on the <code>React.DOM</code> element helper, but JSX and <code>React.createElement</code> work on all tag names.) All SVG attributes match their original capitalization and hyphenation as defined in the specification (ex: <code>gradientTransform</code> must be camel-cased but <code>clip-path</code> should be hyphenated).</p></li>
|
||
</ul>
|
||
<h3><a class="anchor" name="breaking-changes"></a>Breaking changes <a class="hash-link" href="#breaking-changes">#</a></h3>
|
||
<p>It's worth calling out the DOM structure changes above again, in particular the change from <code><span></code>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 <code>ReactDOM.renderToStaticMarkup</code> 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 <code><span></code>s in your <code>render</code> method.</p>
|
||
|
||
<p>These deprecations were introduced in v0.14 with a warning and the APIs are now removed.</p>
|
||
|
||
<ul>
|
||
<li>Deprecated APIs removed from <code>React</code>, specifically <code>findDOMNode</code>, <code>render</code>, <code>renderToString</code>, <code>renderToStaticMarkup</code>, and <code>unmountComponentAtNode</code>.</li>
|
||
<li>Deprecated APIs removed from <code>React.addons</code>, specifically <code>batchedUpdates</code> and <code>cloneWithProps</code>.</li>
|
||
<li>Deprecated APIs removed from component instances, specifically <code>setProps</code>, <code>replaceProps</code>, and <code>getDOMNode</code>.</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="new-deprecations-introduced-with-a-warning"></a>New deprecations, introduced with a warning <a class="hash-link" href="#new-deprecations-introduced-with-a-warning">#</a></h3>
|
||
<p>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.</p>
|
||
|
||
<ul>
|
||
<li><code>LinkedStateMixin</code> and <code>valueLink</code> are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior: <a href="https://www.npmjs.com/package/react-linked-input">react-linked-input</a>.</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="new-helpful-warnings"></a>New helpful warnings <a class="hash-link" href="#new-helpful-warnings">#</a></h3>
|
||
<ul>
|
||
<li>If you use a minified copy of the <em>development</em> build, React DOM kindly encourages you to use the faster production build instead.</li>
|
||
<li>React DOM: When specifying a unit-less CSS value as a string, a future version will not add <code>px</code> automatically. This version now warns in this case (ex: writing <code>style={{width: '300'}}</code>. (Unitless <em>number</em> values like <code>width: 300</code> are unchanged.)</li>
|
||
<li>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.</li>
|
||
<li>Elements will now warn when attempting to read <code>ref</code> and <code>key</code> from the props.</li>
|
||
<li>React DOM now attempts to warn for mistyped event handlers on DOM elements (ex: <code>onclick</code> which should be <code>onClick</code>)</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="notable-bug-fixes"></a>Notable bug fixes <a class="hash-link" href="#notable-bug-fixes">#</a></h3>
|
||
<ul>
|
||
<li>Fixed multiple small memory leaks</li>
|
||
<li>Click events are handled by React DOM more reliably in mobile browsers, particularly in Mobile Safari.</li>
|
||
<li>Input events are handled more reliably in IE 10 and IE 11; spurious events no longer fire when using a placeholder.</li>
|
||
<li>React DOM now supports the <code>cite</code> and <code>profile</code> HTML attributes.</li>
|
||
<li>React DOM now supports the <code>onAnimationStart</code>, <code>onAnimationEnd</code>, <code>onAnimationIteration</code>, <code>onTransitionEnd</code>, and <code>onInvalid</code> events. Support for <code>onLoad</code> has been added to <code>object</code> elements.</li>
|
||
<li>Add-Ons: ReactTransitionGroup now correctly handles multiple nodes being removed simultaneously.</li>
|
||
<li><code>Object.is</code> is used in a number of places to compare values, which leads to fewer false positives, especially involving <code>NaN</code>. In particular, this affects the <code>shallowCompare</code> add-on.</li>
|
||
<li>React DOM now defaults to using DOM attributes instead of properties, which fixes a few edge case bugs. Additionally the nullification of values (ex: <code>href={null}</code>) now results in the forceful removal, no longer trying to set to the default value used by browsers in the absence of a value.</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="post-list-item">
|
||
|
||
|
||
<h1>
|
||
|
||
<a href="/react/blog/2016/02/19/new-versioning-scheme.html">New Versioning Scheme</a>
|
||
|
||
</h1>
|
||
|
||
<p class="meta">
|
||
February 19, 2016
|
||
by
|
||
|
||
|
||
<a href="https://twitter.com/sebmarkbage">Sebastian Markbåge</a>
|
||
|
||
|
||
|
||
</p>
|
||
|
||
<hr>
|
||
|
||
<div class="post">
|
||
<p>Today we're announcing that we're switching to major revisions for React. The current version is 0.14.7. The next release will be: <strong>15.0.0</strong></p>
|
||
|
||
<p>This change shouldn'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't have to wait as long to take advantage of improvements to React. Plus, if you'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't need to leave anyone behind.</p>
|
||
|
||
<p>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're committed to the stability as well as the progress of React going forward.</p>
|
||
<h2><a class="anchor" name="bring-everyone-along"></a>Bring Everyone Along <a class="hash-link" href="#bring-everyone-along">#</a></h2>
|
||
<p>React isn'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.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-1.png" width="403"></p>
|
||
|
||
<p>Therefore it is important that we don't just upgrade our own codebases but that we bring our whole community with us. We take the upgrade path very seriously - for everyone.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-poll.png" width="596"></p>
|
||
<h2><a class="anchor" name="introducing-minor-releases"></a>Introducing Minor Releases <a class="hash-link" href="#introducing-minor-releases">#</a></h2>
|
||
<p>Ideally everyone could just depend on the latest version of React all the time.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-2.png" width="463"></p>
|
||
|
||
<p>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.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-3.png" width="503"></p>
|
||
|
||
<p>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.</p>
|
||
<h2><a class="anchor" name="what-happened-to-1.0.0"></a>What Happened to 1.0.0? <a class="hash-link" href="#what-happened-to-1.0.0">#</a></h2>
|
||
<p>Part of React'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're still following semver. We're just communicating stability by moving the 0 from the beginning to the end.</p>
|
||
<h2><a class="anchor" name="breaking-changes"></a>Breaking Changes <a class="hash-link" href="#breaking-changes">#</a></h2>
|
||
<p>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.</p>
|
||
|
||
<p>We will continue to release <a href="https://www.youtube.com/watch?v=d0pOgY8__JM">codemods</a> for common patterns to make automatic upgrades of your codebase easier.</p>
|
||
|
||
<p>Once we've reached the end of life for a particular major version, we'll release a new major version where all deprecated APIs have been removed.</p>
|
||
<h2><a class="anchor" name="avoiding-the-major-cliff"></a>Avoiding The Major Cliff <a class="hash-link" href="#avoiding-the-major-cliff">#</a></h2>
|
||
<p>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's and Jed's components are only compatible with 15.x.x.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-4.png" width="498"></p>
|
||
|
||
<p>Worst case, you revert back to 15.1.0 for your application. Since you'll want to use your component, you might also revert that one.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-5.png" width="493"></p>
|
||
|
||
<p>Of course, Ryan and Jed think the same way. If we're not careful, we can hit a cliff where nobody upgrades. This has happened to many software project ecosystems in the past.</p>
|
||
|
||
<p>Therefore, we'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.</p>
|
||
|
||
<p><img src="/react/img/blog/versioning-6.png" width="493"></p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="post-list-item">
|
||
|
||
|
||
<h1>
|
||
|
||
<a href="/react/blog/2016/01/12/discontinuing-ie8-support.html">Discontinuing IE 8 Support in React DOM</a>
|
||
|
||
</h1>
|
||
|
||
<p class="meta">
|
||
January 12, 2016
|
||
by
|
||
|
||
|
||
<a href="http://benalpert.com">Ben Alpert</a>
|
||
|
||
|
||
|
||
</p>
|
||
|
||
<hr>
|
||
|
||
<div class="post">
|
||
<p>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't have to worry about most browser bugs.</p>
|
||
|
||
<p>Today, Microsoft <a href="https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE-support">discontinued support for older versions of IE</a>. Starting with React v15, we're discontinuing React DOM's support for IE 8. We've heard that most React DOM apps already don't support old versions of Internet Explorer, so this shouldn't affect many people. This change will help us develop faster and make React DOM even better. (We won'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.)</p>
|
||
|
||
<p>React DOM will continue to support IE 9 and above for the foreseeable future.</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div class="pagination">
|
||
|
||
|
||
<a href="/react/blog/page2/" class="next">
|
||
Next Page »
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
|
||
<footer class="wrap">
|
||
<div class="left">
|
||
A Facebook & Instagram collaboration.<br>
|
||
<a href="/react/acknowledgements.html">Acknowledgements</a>
|
||
</div>
|
||
<div class="right">
|
||
© 2013–2016 Facebook Inc.<br>
|
||
Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
<div id="fb-root"></div>
|
||
|
||
<script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
ga('create', 'UA-41298772-1', 'facebook.github.io');
|
||
ga('send', 'pageview');
|
||
|
||
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
|
||
|
||
(function(d, s, id) {
|
||
var js, fjs = d.getElementsByTagName(s)[0];
|
||
if (d.getElementById(id)) return;
|
||
js = d.createElement(s); js.id = id;
|
||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=623268441017527";
|
||
fjs.parentNode.insertBefore(js, fjs);
|
||
}(document, 'script', 'facebook-jssdk'));
|
||
|
||
docsearch({
|
||
apiKey: '36221914cce388c46d0420343e0bb32e',
|
||
indexName: 'react',
|
||
inputSelector: '#algolia-doc-search'
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|