Skip to content

Instantly share code, notes, and snippets.

@devdoomari3
devdoomari3 / hoc-template.tsx
Last active December 19, 2019 08:10 — forked from rosskevin/hoc-template.tsx
Typescript higher order component (hoc) template
/* variation on https://medium.com/@DanHomola/react-higher-order-components-in-typescript-made-simple-6f9b55691af1 */
import * as React from 'react'
import { wrapDisplayName } from 'recompose'
// Props you want the resulting component to take (besides the props of the wrapped component)
interface ExternalProps {}
// Props the HOC adds to the wrapped component
export interface InjectedProps {}