Jump to content
GreenSock

Decode

Members
  • Posts

    1
  • Joined

  • Last visited

Decode's Achievements

  1. Any tips how to type provided custom hook useArrayRef? Example: const [refItems, setRefItems] = useArrayRef(); Adding refs: <div ref={setRefItems} .../> <div ref={setRefItems} .../> and finally [...refItems.current].forEach(function (index) { ... }) gives: Type error: Property 'current' does not exist on type 'MutableRefObject<any> | ((ref: any) => any)'. Property 'current' does not exist on type '(ref: any) => any'. Thanks!
×