Consume the values of a reference without major inconvenience
This hook has a behavior similar to useEffect but focused on resolving the consumption of one or more references.
Example
import { useRef } from"atomico";import { useRefValues } from"@atomico/hooks/use-ref-values";functioncomponent(){constref=useRef();useRefValues(// 👇 current will be the value assigned to ref.current ([current])=>{// 1️⃣ here the effect dependent on the reference// 🔴 The following line is optionalreturn ()=>{// (Optional) here the cleanup of the reference dependent effect } }, [ref] );return <host> <inputref={ref}/> </host>}