Skip to content

Instantly share code, notes, and snippets.

@treyhuffine
Last active February 26, 2018 14:07
Show Gist options
  • Save treyhuffine/0f7eb412632d7e41f58aae4d463db18e to your computer and use it in GitHub Desktop.
Save treyhuffine/0f7eb412632d7e41f58aae4d463db18e to your computer and use it in GitHub Desktop.
A simple example of HOC
import React from 'react';
const higherOrderComponent = (WrappedComponent) => {
class HOC extends React.Component {
render() {
return <WrappedComponent />;
}
}
return HOC;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment