You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course, that does make sense indeed. The strange thing however is that TypeScript doesn't complain when you use Component.defaultProps and leave the the name property in the interface required. That confused me.
React defaultProps will be deprecated in future releases (see PR). Therefore I want to use es6 default values.
TypeScript Version: 3.7.0-dev.20190822
Search Terms:
Code
The React component
The place where I use it
Expected behavior:
No type error as the default value is already defined
Actual behavior:
Typescript says that property is missing.
The text was updated successfully, but these errors were encountered: