Ariakit
/

collection

Items count: 0
🍎 Apple
🍇 Grape
🍊 Orange
import * as Ariakit from "@ariakit/react";
import "./style.css";
export default function Example() {
const collection = Ariakit.useCollectionStore();
const length = collection.useState((state) => state.renderedItems.length);
return (
<Ariakit.Collection store={collection} className="collection">
<div>Items count: {length}</div>
);
}

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue