-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ny hook useMergeRefs
som erstatter mergeRefs
#2609
Conversation
🦋 Changeset detectedLatest commit: aae0bec The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
@@ -78,18 +78,18 @@ export const ShowMore = forwardRef<HTMLElement, ShowMoreProps>( | |||
"aria-labelledby": ariaLabelledby, | |||
...rest | |||
}, | |||
ref, | |||
/* ref, */ |
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.
Siden dette skal være tilnærmet en 1-1 kopi av en faktisk ds-react komponent komenterte jeg bare ref ut her siden den ikke blir brukt lokalt på nettsiden
Storybook demo7ed24e2d6 | 61 komponenter | 401 stories |
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Description
Vi bruker
mergeRefs
en del rundt i prosjektet, men må wrappe iuseMemo
hver gang. HookenuseMergeRefs
løser det for oss med å kjøre det gjennomuseCallback
Gjorde et git-søk og fant ingen andre som brukte
mergeRefs
fra@navikt/ds-react
så fjernet den fraindex
-export. Vi får evt vurdere om vi har lyst å exponere hooks og utilities på en mer strukturert måte i fremtiden.