Skip to content

Instantly share code, notes, and snippets.

@Willmo36
Last active April 11, 2017 11:07
Show Gist options
  • Save Willmo36/aaca949b6ae731db6f7b8373f4026102 to your computer and use it in GitHub Desktop.
Save Willmo36/aaca949b6ae731db6f7b8373f4026102 to your computer and use it in GitHub Desktop.
TypeScript HoC props interface
export default function hoc<T extends HoCProps>(WrappedComponent): React.ComponentClass<T> {
return class extends React.Component<T, null> {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment