The component-based View Library from Facebook with Version 17 is a Major Update with no new Features, but with a significant Upgrade improvements for the future.
The first Release Candidate of React 17 is here. Two and a half years after the publication of the last Major Updates, there is now a successor, which, however, brings a special feature: the New dev-facing Features not contains Version 17. Instead, the focus is in Version 17 to simplify Upgrades.
New React Features are in the works, we’ve decided not to do this with React 17 roll out the blog post for the Release. Version 17 is to be understood instead as a milestone in the React-Release history, and wants to make it in the future, be easier to use different versions of React simultaneously in a project. Previous React-Upgrades were a matter of “all or nothing”. Either you are on the old Version remained or have migrated all of your App to the new Release. A between them there were not. This approach is not as long as it works well until she did it: a Few API Changes, for example, the Legacy Context deprecaten API, you can’t just automate. Modern Apps do not use these Apps in the normal case of React, the API will be supported but still. The React Core Team was faced with the choice to support this API, either or all of the Apps, the honor of the API are still in use, future Upgrades to users.
The New Gradual Upgrades
React 17 for the first time enables a gradual Upgrades. A Migration from Version to Version meant to Version 17, to upgrade the complete App at a time. In most cases, this is not a Problem. For Bases that are a few years old, and not actively maintained, the already difficult. While it was previously possible to use two versions of React in parallel, this architecture, however, is fragile and is causing problems with Events. React 17 creates the conditions to ensure that you will all these problems for future Major Upgrades no longer have. If you’re updating from Version 17 to Version 18, you have in addition to the Default update all at once with the Option to leave parts of your application on an older Version, at least. So you have the opportunity to upgrade Apps with the current Version, no longer supported dependencies.
New in Version 18
The introduction of other new Features has been moved to the Core Dedicated Team on upcoming Releases. Nevertheless, Version 17 is a Major Release. The reason is that this piece of Upgrades have to enable some potentially non-backward-compatible Changes to Reacts event system is necessary. For most Apps, the Upgrade will create very easily. If you experience any problems, you can open a corresponding Issue.
So you can get the Whole thing in action, look at, there is also a Demo Repository that shows how you can have an older Version of React-lazy-load.
Some other minor Breaking Changes there are, however, yet. So Version brings 17 improvements to the browser compatibility as well as Reacts Error-Handling, in addition, so-called Private Dependencies have been removed. Anyone who is interested in this, and for the Changes to Reacts Event Delegation mechanism in Detail, reference is made to the official blog post for the Release.
Install you can use the Release Candidate via npm:
npm install firstname.lastname@example.org email@example.com
or, alternatively, via yarn:
yarn add firstname.lastname@example.org email@example.com
Alternatively, you can integrate the new Version is also available as a UMD via CDN in your projects:
<script crossorigin src="https://firstname.lastname@example.org/umd/react.production.min.js"></script> <script crossorigin src="https://email@example.com/umd/react-dom.production.min.js"></script>
For more detailed installation instructions can be found in the documentation.