Skip to content

Instantly share code, notes, and snippets.

@alvincrespo
Last active October 30, 2017 13:13
Show Gist options
  • Save alvincrespo/f815456dc9e2d7d2aecc988ededdb064 to your computer and use it in GitHub Desktop.
Save alvincrespo/f815456dc9e2d7d2aecc988ededdb064 to your computer and use it in GitHub Desktop.
Traditional React Component Composition
import React, { Component } from 'react';
import Form from './Form';
import EmailField from './EmailField';
class App extends Component {
onValidEmail = () => {}
onInvalidEmail = () => {}
render() {
return(
<Form>
<EmailField onValidEmail={this.onValidEmail} onInvalidEmail={this.onInvalidEmail} />
</Form>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment