Skip to content

initialSnapshot()

initialSnapshot(options): RiffleSnapshot

Defined in: snapshot.ts:18

The snapshot an instance created with these options reports before anything moves. Adapters render from it before mount and during server rendering.

Must agree with the engine’s own first snapshot exactly, or every adapter flashes on mount; tests/adapter.test.ts guards this with a property test against a real instance rather than examples.

RiffleOptions

RiffleSnapshot

import { initialSnapshot } from '@rpxl/riffle'
const snapshot = initialSnapshot({ count: 5, startIndex: 2 })