Options
All
  • Public
  • Public/Protected
  • All
Menu

Options passed to useRecords

Hierarchy

  • UseRecordsOptions

Index

Properties

Optional flashDurationMs

flashDurationMs: number

If subscribed to websockets, sets the duration that each new record will have record["@meta"].flash === true

Optional maxRecords

maxRecords: number

Max number of records to keep in memory before applying truncatePolicy

Optional pageSize

pageSize: number

Number of records to fetch per request (limit). Defaults to 25.

Optional query

query: { filter?: string; type: "index" } | { peek?: boolean; type: "log" }

Query to run. Defaults to an unfiltered index query.

Optional renderFrequencyMs

renderFrequencyMs: number

If subscribed to websockets, sets the max frequency at which re-renders are triggered (to prevent lagging)

Optional secret

secret: string

Secret to use for authentication

stream

Identifier for the stream or instance to query

Optional subscribe

subscribe: boolean | { pageSize?: number; pollFrequencyMs?: number }

If configured, will open a websocket and trigger a re-render when new records are received.

Optional truncatePolicy

truncatePolicy: "start" | "end" | "auto"

If set, will truncate results to maxRecords by removing records

Legend

  • Property

Generated using TypeDoc