Skip to content

Instantly share code, notes, and snippets.

View giriannamalai's full-sized avatar
🪲
Catching

Giri Annamalai M giriannamalai

🪲
Catching
View GitHub Profile
@giriannamalai
giriannamalai / Enhance.js
Created November 10, 2017 14:04 — 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() {