Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save janjakubnanista/854019d2044cabd1b5b2daf7bb56c2dd to your computer and use it in GitHub Desktop.
Save janjakubnanista/854019d2044cabd1b5b2daf7bb56c2dd to your computer and use it in GitHub Desktop.
// Approach 1: the easy way out
//
// We can just define the return type of our Select
// and make sure it matches the return type of React.FC
function Select<T>(props: SelectProps<T>): React.ReactElement | null {
return null;
}
// Unfortunately we can still pass invalid defaultProps :(
Select.defaultProps = 7;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment