Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Component-based development with React

Helielson
October 08, 2016

Component-based development with React

How to create applications component-based with React, Relay and Graphql.
Presented on FrontIn Salvador.

Helielson

October 08, 2016
Tweet

More Decks by Helielson

Other Decks in Programming

Transcript

  1. Nooooooooooo! "To set the record straight: React components are far

    more powerful than Angular templates; they should be compared with Angular’s directives instead. [Directives are Angular's way of creating custom elements]." Pete Hunt quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look
  2. - It's the markup - It's the javascript - It's

    the behavior's function It's more than a template engine
  3. helloWorld.jsx import React from 'react'; class HelloMessage extends React.Component {

    render() { return ( <div> Hello {this.props.name} </div> ); } } React.render(<HelloMessage name="John" />, mountNode);
  4. React.createContainer(RecommendButton, { fragments: { document: () => Relay.QL` fragment on

    Document { viewerLiked, whoRecommended { picture } } `, } }