Skip to content
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

fix(types): Fix type of 'safeFindDOMNode' function #6465

Merged
merged 1 commit into from Oct 12, 2022

Conversation

RyanCavanaugh
Copy link
Contributor

Based on its body, safeFindDOMNode appears to have an incorrect function signature (and TypeScript 4.9 complains about it as a result). The declared type of React.ComponentClass refers to the thing you new, whereas React.Component refers to the instance of the class. setState is an instance method, not a static method, so will (presumably) never be in the former.

@kyletsang kyletsang merged commit f2f1847 into react-bootstrap:master Oct 12, 2022
@kyletsang
Copy link
Member

Thanks!

@RyanCavanaugh RyanCavanaugh deleted the fixTypesMaybe branch October 12, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants