tooltip icon indicating copy to clipboard operation
tooltip copied to clipboard

Determining the availability of props.visible

Open devdammit opened this issue 6 years ago • 4 comments

Hello Guys! I noticed that you check the props.visible by the presence of it in props. Why not check for undefined?

https://github.com/react-component/tooltip/blob/b5e43fd3128f6bec414c7bb0308a4f998105118a/src/Tooltip.jsx#L72

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.

devdammit avatar Aug 23 '17 13:08 devdammit