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

feat: add useResizeObserver hook #68

Closed
wants to merge 1 commit into from

Conversation

nelsliu9121
Copy link

useResizeObserver

const { width, height, offsetWidth, offsetHeight } = useResizeObserver({
  ref: elementRef,
  onResize?: ({ width, height, offsetWidth, offsetHeight }) => {},
  disabled?: false
});

This might be buggy, but I hope that I am facing the right direction.

Fixes #9

@afc163 afc163 requested a review from zombieJ August 9, 2021 06:48
onResize?: OnResizeHandler;
disabled?: boolean;
}

Choose a reason for hiding this comment

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

`
/**
*

*/
`

Copy link

@Amir-Alipour Amir-Alipour left a comment

Choose a reason for hiding this comment

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

good idea, i leave a comment in code,
i think it can be better with some code doc

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.

Hooks support
2 participants