Skip to content

@pgege/kaboo-react


Function: directChildren()

directChildren(groups, parentId): GroupEntry[]

Defined in: utils/groups.ts:77

Direct children of parentId (one level deep) via the parentGroup field.

Parameters

groups

Record\<string, StreamGroup>

parentId

string

Returns

GroupEntry[]

Example

import { directChildren } from "@pgege/kaboo-react";

function childCount(
  groups: Parameters<typeof directChildren>[0],
  parentId: string,
) {
  return directChildren(groups, parentId).length;
}