Skip to content

Replace useElementSize with useResizeObserver #222

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

Merged
merged 3 commits into from
Jul 16, 2025

Conversation

cristianoventura
Copy link
Contributor

@cristianoventura cristianoventura commented Jul 15, 2025

What?

While working on the repo, I noticed a deprecation warning for the useElementSize hook, which has been removed in the next version. https://usehooks-ts.com/migrate-to-v3#removed-hooks

Screenshot 2025-07-15 at 2 27 42 PM

Why?

useElementSize is marked as deprecated.

How to test

To test this change:

  • Run yarn install in the assets folder
  • Resize the window
  • Check that the chart are is responsive

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (mage lint) and all checks pass.
  • I have run tests locally (mage test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

@cristianoventura cristianoventura self-assigned this Jul 15, 2025
@cristianoventura cristianoventura requested a review from a team as a code owner July 15, 2025 18:37
@cristianoventura cristianoventura requested review from szkiba and 2Steaks and removed request for a team July 15, 2025 18:37
Copy link
Collaborator

@2Steaks 2Steaks left a comment

Choose a reason for hiding this comment

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

LGTM ⭐

Copy link
Contributor

@szkiba szkiba left a comment

Choose a reason for hiding this comment

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

LGTM

@szkiba szkiba merged commit df36f31 into master Jul 16, 2025
31 checks passed
@szkiba szkiba deleted the chore/replace-useElementSize branch July 16, 2025 19:00
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