Skip to content

Conversation

@pimjunhavittaya
Copy link

Please explain PR reason

Fix type errors related to React ref for React 19

<>
<div ref={this.check} />
<div
ref={(el) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use useCallback for the ref function

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JustFly1984 ,
Cannot use useCallback inside a class component, but I refactored to follow the same pattern as in packages/react-google-maps-api/src/GoogleMap.tsx

Please review again, thank you.

Copy link
Owner

@JustFly1984 JustFly1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use useCallaback for ref function

@JustFly1984 JustFly1984 merged commit 05fed65 into JustFly1984:upgrade Feb 11, 2025
@JustFly1984
Copy link
Owner

merged and released 2.20.6

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.

3 participants