-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Determining the availability of props.visible #95
Comments
But why, are you going to lint code in |
@benjycui, No, of course, we do not check node_modules into the style code. :) |
Yep, you can PR. But I don't agree with this ESLint rule, we can set default prop for |
@benjycui I agree with @mochachai, need to check it for undefined. For example in my case I need to use rc-tooltip in two different scenes inside the one component.
So I was going to just pass true or undefined in 'visible' props, but now I have to do one trick:
|
Hello Guys! I noticed that you check the props.visible by the presence of it in props.
Why not check for undefined?
tooltip/src/Tooltip.jsx
Line 72 in b5e43fd
We use a rule eslint - react/require-default-props. And set props.visible as undefined in the defaultProps. And if the props.visible is equal to undefined, then he still gets to extraProps.popupVisible.
The text was updated successfully, but these errors were encountered: