Facebook's Relay For React Open Sourced
Facebook's Relay For React Open Sourced
Written by Alex Armstrong   
Monday, 24 August 2015

Facebook has open sourced a technical preview of Relay, its framework that enables declarative data fetching and updates for React applications. Relay v0.1.1 can be downloaded from GitHub together with a starter kit with the components you need to try it out.

Facebook’s React.js user interface library became open source in 2013. Now Facebook is open sourcing the framework it has developed to manage data and client applications. It supplies the "missing piece" for developers working with React.js - how to get data to and from the server.

 

relaybanner

 

The announcement of the Relay Technical Preview, Joseah Savona explains:

While React simplified the process of developing complex user-interfaces, it left open the question of how to interact with data on the server. It turns out that this was a significant source of friction for our developers; fragile coupling between client and server caused data-related bugs and made iteration harder. Furthermore, developers were forced to constantly re-implement complex async logic instead of focusing on their apps. Relay addresses these concerns by borrowing important lessons from React: it provides declarative, component-oriented data fetching for React applications.

 

To clarify the README.md on GitHub states:

Relay is a JavaScript framework for building data-driven React applications. 

  • Declarative: Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.
  • Colocation: Queries live next to the views that rely on them, so you can easily reason about your app. Relay aggregates queries into efficient network requests to fetch only what you need.
  • Mutations: Relay lets you mutate data on the client and server using GraphQL mutations, and offers automatic data consistency, optimistic updates, and error handling.

 

relayarch

 

In this talk at the recent React Europe conference, Joseph Savona  explores the problems Relay solves, its architecture and query lifecycle, and shows how Relay powers applications as complex as the Facebook News Feed. Skip the first two minutes to get to the point at which the technical hitch is solved and the presentation itself starts. 

 

As well as the Technical Preview, there is also a Relay Starter Kit on GitHub that includes an app server, a GraphQL server and a transpiler that you can use to get started building an app with Relay plus a link to the Relay tutorial that walk you through using the kit.

relaysq

More Information

Relay

Download Relay v0.1.1 on GitHub

Related Articles

React Devtools Beta 

React 0.14 

 

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

 

Banner


Apache Spark With Structured Streaming
21/07/2017

Apache Spark 2.2 has been released with Structured Streaming no longer experimental. The accompanying release of PySpark is also available in pypi.



Commercial Ruby Distro Enters Beta
27/07/2017

ActiveRuby, a commercially supported Ruby distribution is now available as a beta version from ActiveState as part of its push to expand the portfolio of languages for which it provides support.


More News

 

 
 

 

blog comments powered by Disqus

Last Updated ( Thursday, 15 September 2016 )
 
 

   
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.