Last active
June 4, 2020 15:39
-
-
Save janjakubnanista/854019d2044cabd1b5b2daf7bb56c2dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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