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

Ny hook useMergeRefs som erstatter mergeRefs #2609

Merged
merged 3 commits into from
Jan 12, 2024
Merged

Ny hook useMergeRefs som erstatter mergeRefs #2609

merged 3 commits into from
Jan 12, 2024

Conversation

KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented Jan 11, 2024

Description

Vi bruker mergeRefs en del rundt i prosjektet, men må wrappe i useMemo hver gang. Hooken useMergeRefs løser det for oss med å kjøre det gjennom useCallback

Gjorde et git-søk og fant ingen andre som brukte mergeRefs fra @navikt/ds-react så fjernet den fra index-export. Vi får evt vurdere om vi har lyst å exponere hooks og utilities på en mer strukturert måte i fremtiden.

@KenAJoh KenAJoh requested a review from HalvorHaugan January 11, 2024 14:55
Copy link

changeset-bot bot commented Jan 11, 2024

🦋 Changeset detected

Latest commit: aae0bec

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

This PR includes changesets to release 7 packages
Name Type
@navikt/ds-react Patch
@navikt/ds-css Patch
@navikt/ds-tokens Patch
@navikt/ds-tailwind Patch
@navikt/aksel-icons Patch
@navikt/aksel Patch
@navikt/aksel-stylelint Patch

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, */
Copy link
Collaborator Author

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

Copy link
Contributor

github-actions bot commented Jan 11, 2024

Storybook demo

7ed24e2d6 | 61 komponenter | 401 stories

HalvorHaugan
HalvorHaugan previously approved these changes Jan 12, 2024
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
@KenAJoh KenAJoh merged commit b251e3f into main Jan 12, 2024
@KenAJoh KenAJoh deleted the hooks-addons branch January 12, 2024 14:39
@github-actions github-actions bot mentioned this pull request Jan 12, 2024
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.

2 participants