useTransientCollection

Returns every member's reading on a transient collection for an environment, re-rendering when any changes.

@internote/canvas-sdk/reactHook
On this page
import { useTransientCollection } from '@internote/canvas-sdk/react';

The array is the channel's own snapshot, stable between changes, and empty on the server.

#Signature

<T>(channel: TransientCollection<T>, where: Addressed): readonly T[]

#Parameters

channel
The collection, declared beside the surface that publishes it.
where
Which environment to read, usually ctx.

#Example

const rows = useTransientCollection(legendRows, ctx);

Declared in packages/canvas-sdk/src/react/use-transient.ts:69.

Last updated