React 0.14
React 0.14
Written by Alex Denham   
Tuesday, 07 July 2015

Facebook has released a beta of the next version of React, its open source JavaScript library.

 

 

The announcement of the new beta was made to coincide with ReactEurope which took place in Paris. According to a blog post by Ben Alpert, one of its developers, Facebook is:

“continuing to let React mature and to make minor changes as the APIs continue to settle down”.

React lets you describe what you want to render in a declarative way using components and elements that are shared by packages including react-native, react-art, react-canvas, and react-three. In recognition of this, the main react package is being split into two: react and react-dom.

The react package contains React.createElement, React.createClass and React.Component, React.PropTypes, React.Children, and the other helpers related to elements and component classes. The developers describe these as the isomorphic or universal helpers that you need to build components.

The react-dom package contains:

ReactDOM.render

ReactDOM.unmountComponentAtNode

ReactDOM.findDOMNode

In react-dom/server we have server-side rendering support with:

ReactDOMServer.renderToString

ReactDOMServer.renderToStaticMarkup

The developers anticipate that most components will need to depend only on the react package, which is lightweight and doesn't include any of the actual rendering logic. According to the blog post:

“to start, we expect people to render DOM-based components with our react-dom package, but there's nothing stopping someone from diving deep on performance and writing an awesome-faster-react-dom package which can render the exact same DOM-based components. By decoupling the component definitions from the rendering, this becomes possible.”

This organization also paves the way to writing components that can be shared between the web version of React and React Native, and while this is hard to do at the moment, the plan is to make this easy in a future version so you can share React code between your website and native apps.

The other major change to the new version is the exposing of refs to DOM components as the DOM node itself. The developers looked at what you can do with a ref to a DOM component and realized that it is always used as a call to get the underlying DOM node. The intermediate call is now redundant, and the ref is the actual DOM node.

 

reactsq

 

More Information

React

React on GitHub

Related Articles

React 0.11 Released

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


Matternet - Life Saving Distribution By Drone
23/09/2017

The newly unveiled Matternet Station, together with Matternet's cloud platform and its autonomous M2 drones, is a viable solution for delivering small payloads where speed is essential. Its lates [ ... ]



Top 10 From Around The Web: Python Development Resources
29/09/2017

Python is the topic of this week's catch of blog posts that might otherwise have escaped your notice. It ranges over many different scenarios including machine learning, distributed programming, scrip [ ... ]


More News

 

 
 

 

blog comments powered by Disqus

Last Updated ( Tuesday, 07 July 2015 )
 
 

   
Banner
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.