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

Add useRefObjectAsForwardedRef to public hooks #2591

Merged
merged 5 commits into from
Nov 18, 2022

Conversation

iansan5653
Copy link
Contributor

Adds the useRefObjectAsForwardedRef hook to the publicly exported hooks. This is a generic and useful hook that we can use in the Memex application and elsewhere.

@iansan5653 iansan5653 requested review from a team and joshblack November 17, 2022 16:53
@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2022

🦋 Changeset detected

Latest commit: 7b5e507

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 78.92 KB (+0.03% 🔺)
dist/browser.umd.js 79.55 KB (+0.03% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-2591 November 17, 2022 17:02 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2591 November 17, 2022 17:03 Inactive
@iansan5653 iansan5653 temporarily deployed to github-pages November 17, 2022 17:03 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2591 November 17, 2022 17:04 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

🚀

@iansan5653 iansan5653 enabled auto-merge (squash) November 18, 2022 16:36
@iansan5653 iansan5653 temporarily deployed to github-pages November 18, 2022 16:42 Inactive
@iansan5653 iansan5653 merged commit 764bf6b into main Nov 18, 2022
@iansan5653 iansan5653 deleted the make-useRefObjectAsForwardedRef-public branch November 18, 2022 16:42
@joshblack
Copy link
Member

Trying to dig into usage of this in PRC, is this kind of acting like a useMergedRefs type hook or is there something distinct going on here with the useImperativeHandle?

It seems like this kind of acts like a superset in that it doesn't have to be an HTML element where hooks like a useMergedRefs would expect only HTML elements?

@primer-css primer-css mentioned this pull request Nov 18, 2022
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

3 participants