React v16.2.0: Improved Support for Fragments

React 16.2 is here:  - the biggest addition is support for

  • To make the authoring experience as convenient as possible, we’re adding syntactical support for fragments to JSX: – – In React, this desugars to a element, as in the example from the previous section.
  • Support for fragment syntax in JSX will vary depending on the tools you use to build your app.
  • Support for JSX fragments is available in Babel v7.0.0-beta.31 and above!
  • Upgrade to the latest TypeScript with the command: – – Flow support for JSX fragments is available starting in version 0.59!
  • A big thanks to everyone who filed issues, contributed to syntax discussions, reviewed pull requests, added support for JSX fragments in third party libraries, and more!

React 16.2 is now available! The biggest addition is improved support for returning multiple children from a component’s render method. We call this feature fragments:
Continue reading “React v16.2.0: Improved Support for Fragments”