Skip to content

UseStreamOptions

Defined in: react-hooks/src/use-stream.ts:14

Stream hook options.

optional initialText: string

Defined in: react-hooks/src/use-stream.ts:22

Initial text value


optional onChunk: (chunk) => void

Defined in: react-hooks/src/use-stream.ts:16

Called for each chunk

string

void


optional onComplete: (fullText) => void

Defined in: react-hooks/src/use-stream.ts:18

Called when stream completes

string

void


optional onError: (error) => void

Defined in: react-hooks/src/use-stream.ts:20

Called on error

Error

void