UNPKG

@river-build/react-sdk

Version:
27 lines 1.11 kB
import { type MessageTimeline } from '@river-build/sdk'; import { type ActionConfig } from './internals/useAction'; /** * Hook to get the scrollback action for a stream. * * Scrollback is the action of getting miniblocks from a stream before a certain point in time. * Getting miniblocks means that new events that are possibly new messages, reactions and so on are fetched. * * @param streamId - The id of the stream to get the scrollback action for. * @param config - Configuration options for the action. * @returns The `scrollback` action and its loading state. */ export declare const useScrollback: (streamId: string, config?: ActionConfig<MessageTimeline['scrollback']>) => { data: { terminus: boolean; firstEvent?: import("@river-build/sdk").TimelineEvent | undefined; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; scrollback: () => Promise<{ terminus: boolean; firstEvent?: import("@river-build/sdk").TimelineEvent | undefined; }>; }; //# sourceMappingURL=useScrollback.d.ts.map