Skip to content

Instantly share code, notes, and snippets.

View pedroparra's full-sized avatar
🏠
Working from home

Pedro J. Parra pedroparra

🏠
Working from home
View GitHub Profile
@pedroparra
pedroparra / Enhance.js
Created March 8, 2016 19:25 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {