-
-
Notifications
You must be signed in to change notification settings - Fork 531
Fix typo in component name #888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/shared/propTypes.ts
Outdated
export const isViews = PropTypes.arrayOf(PropTypes.oneOf(allViews)); | ||
|
||
export const isView: Requireable<View> = function isView(props, propName, componentName) { | ||
export const isView: Requireable<View> = function (props, propName, componentName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't think you need a function name for that code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sure we're getting the right error stack of something throws an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed it, thanks
minDate?: Date; | ||
setMaxDate: (date?: Date) => void; | ||
setMinDate: (date?: Date) => void; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be cleaner to use Optional Property
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a significant difference between "this property must be passed, but may be undefined somewhere down the line" and "you can forget about passing that property and it will be alright". It's purposeful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wojtekmaj Wow, that's right, I get it.
Hi! Most of your changes, removing React.FC are causing duplicated types to be produced, resulting in errors in some IDEs. This has been fixed in 70bd390 and I have no plans of rolling it back unless a better solution is proposed. The typo is legit though. :D |
@wojtekmaj |
@wojtekmaj |
Thanks! 👍 |
@wojtekmaj |
Hello 👋, @wojtekmaj
Thanks for sharing this great library.
I fixed a typo in the component name.