-
Notifications
You must be signed in to change notification settings - Fork 526
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
Export useResizeObserver from @primer/react #3027
Conversation
🦋 Changeset detectedLatest commit: 738c2a5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
Hey @talum! 👋 Thanks so much for taking the time to make a PR for this 🙏 As a rule of thumb, when should we expect things be exported from Primer for hooks like this versus be packages in dotcom? (e.g.: https://gh.io/AAjq3a7) I wasn't sure and just wanted to double-check 👀 |
@joshblack Great question, and I don't know about the answer! I'm following guidance from this comment: https://github.com/github/primer/issues/1908#issuecomment-1467375326
🤔 Update: I think that one doesn't listen for resizing of a given element. Yeah, that one watches for window resizes whereas I care about resizing a certain element. So I think we do need this and I'd rather import it from a package rather than copying it over. |
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.
Thank you! ✨
@talum totally! Makes sense 👍 |
Exporting the
useResizeObserver
hook from @primer/react so it can be used outside of Primer!Closes https://github.com/github/primer/issues/1908
Screenshots
n/a
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.