Skip to content

Instantly share code, notes, and snippets.

@einarlove
Last active April 28, 2021 08:26
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 einarlove/f6fa559f5942dce2afa70c10d3f4146e to your computer and use it in GitHub Desktop.
Save einarlove/f6fa559f5942dce2afa70c10d3f4146e to your computer and use it in GitHub Desktop.
Pick the props you want from another react function
type Props<
T extends React.FunctionComponent,
P extends keyof Parameters<T>[0]
> = Pick<Parameters<T>[0], P>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment