Skip to content

Instantly share code, notes, and snippets.

View jeromepl's full-sized avatar

Jérôme Parent-Lévesque jeromepl

View GitHub Profile
@jeromepl
jeromepl / Enhance.js
Last active April 6, 2020 20:26 — forked from sebmarkbage/Enhance.js
Higher-order Components in React with ES7
import { Component } from "React";
export default (ComposedComponent) => class extends Component {
constructor(props) {
super(props);
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}