WeaverseItemStore[] — Child item stores that are present in the runtime registry. It returns an empty array when the parent instance cannot be found.
The current SDK expects a found parent instance to contain a children array. If custom data omits that field, the hook can throw instead of returning an empty array.
The hook resolves the parent with useItemInstance(), maps its child IDs to Weaverse.itemInstances, and filters out IDs that do not have a registered item store:
export let useChildInstances = (id?: string) => { let currentInstance = useItemInstance(id) if (!currentInstance) { return [] } let { itemInstances } = Weaverse let { data: { children }, } = currentInstance return children .map(({ id }: { id: string }) => itemInstances.get(id)) .filter(Boolean) as WeaverseItemStore[]}