{"library":"react-multi-ref","type":"library","category":null,"description":"react-multi-ref is a lightweight utility library designed to simplify managing references to multiple, dynamically created React elements. It addresses a common challenge in React development where developers need to collect and interact with a collection of DOM nodes or component instances, especially when dealing with lists or forms. The current stable version is 1.0.2, indicating a mature and stable API. As a utility, its release cadence is likely slow, focusing on stability rather than frequent feature additions. Key differentiators include its simplicity, providing a `Map`-like interface to access refs by a custom key, and its explicit support for both functional components (via `useState`) and class components, with integrated TypeScript and Flow type definitions for enhanced developer experience. It avoids the complexities of managing arrays of refs manually or relying on less explicit methods.","language":"javascript","status":"active","version":"1.0.2","tags":["javascript","react","ref"],"install":[{"cmd":"npm install react-multi-ref","imports":["import MultiRef from 'react-multi-ref';","const [itemRefs] = useState(() => new MultiRef());","<input ref={itemRefs.ref(i)} />"]},{"cmd":"yarn add react-multi-ref","imports":[]},{"cmd":"pnpm add react-multi-ref","imports":[]}],"homepage":null,"github":"https://github.com/Macil/react-multi-ref","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-multi-ref","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/react-multi-ref/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}