Skip to content

Instantly share code, notes, and snippets.

@vitkon
Created November 15, 2017 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitkon/918d9d241ca1fc63a1f283485735311a to your computer and use it in GitHub Desktop.
Save vitkon/918d9d241ca1fc63a1f283485735311a to your computer and use it in GitHub Desktop.
Typescript React

Component as an argument in a function

new () => React.Component<any, any>

// example
export const addValidatedFormContainer = (validators: any[] = []) =>
    (component: new () => React.Component<any, any>) => flow(
        validate(validators),
        makeWrapper()
    )(component);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment