Skip to main content
useMergeRefs
@coinbase/cds-common@8.34.1
Combines multiple refs into a single ref callback, allowing a component to work with multiple ref instances simultaneously. Useful when you need to combine refs from different sources, such as forwarded refs and internal component state.
Import
import { useMergeRefs } from '@coinbase/cds-common/hooks/useMergeRefs'
SourceView source code
View as Markdown

Basic usage

Loading...

With Multiple Refs

Loading...

With Function Ref

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.