createPool

import { createPool } from "@roku-sdk/flex-grid";
createPool<T>(getTemplateConfig: (type: string) => TemplateConfig<T>, options: CreatePoolOptions): CardPool<T>

Description

createPool — description pending.

Parameters

NameTypeDescription
getTemplateConfig(type: string) => TemplateConfig<T>
optionsCreatePoolOptions

Return values

Returns CardPool<T>.

Types

TemplateConfig

Cell component factory and initial dimensions used to populate a shared card pool.

NameTypeDescription
cellHeightnumber
cellWidthnumber
getCellComponent(templateId: string) => Component<CellRenderProps<T>>

CreatePoolOptions

Optional wiring for createPool.

NameTypeDescription
debugViewport?() => booleanWhen provided and returns true, each pooled node overlays its pixel translation.
gridKey?objectInitial per-grid instance key (optional — use setGridKey for late binding).
idPrefix?stringPrefix for pooled node SceneGraph ids; defaults to gePool_${n} per pool instance.
perf?PerfPluginPerf plugin notified of pool hits, misses and warmup completion.

Did this page help you?