Skip to main content

useCollectionRender()

useCollectionRender(collection, parent, renderDropIndicator?): ReactNode

Copied from RAC, unexported hook: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L148

Hook serves as the basis of the root and branch renderers for Collections: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L139

Parameters

collection

Collection<Node<unknown>>

parent

null | Node<unknown>

renderDropIndicator?

(target) => ReactNode

Returns

ReactNode