-
Notifications
You must be signed in to change notification settings - Fork 35
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
Do not declare isReactComponent #25
Conversation
@@ -430,14 +430,10 @@ export default class extends React.Component { | |||
return e.touches[0]; | |||
} | |||
|
|||
isReactComponent(reactElement) { |
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.
Hi @jacekradko - What is your opinion of keeping the method but changing the name togetIsReactComponent
to avoid name collision? I like the method because its name expresses its purpose.
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.
Sounds good to me. Conveying intent is important.
Hi @jacekradko - Thanks for identifying this issue and providing a fix. You are awesome! I made a comment on the code. Please have a look and let me know your thoughts. Thanks! |
@ethanselzer I made the changes as you suggested. Same in react-hover-observer |
With the React 16.5.0 release, this component's use of
isReactComponent
breaks React'sshouldConstruct
check. Here is a more detailed explanation of the problem: facebook/react#13580Here is a working demo of the bug: https://codesandbox.io/s/nm1nn0374