useMergeRefs is a custom hook used to merge several react refs into a single one.


import { useMergeRefs } from "@chakra-ui/react"

Return value#

The useMergeRefs hook returns a function that receives the element and assign the value to the given React refs.


A div with multiple refs.
Editable Example

Usage combining with another Chakra-UI hooks#

Editable Example
Edit this page

Proudly made inNigeria by Segun Adebayo