Skip to main content

Function: useReviewThread()

useReviewThread(reviewUri, options): UseQueryResult<OutputSchema, Error>

Defined in: web/lib/hooks/use-review.ts:229

Fetches a review thread (review with all nested replies).

Parameters​

reviewUri​

string

AT-URI of the parent review

options​

UseReviewsOptions = {}

Hook options

Returns​

UseQueryResult<OutputSchema, Error>

Query result with thread data

Remarks​

Returns the full thread tree structure for unlimited-depth threading. The thread includes the parent review and all recursive replies.

Example​

const { data } = useReviewThread(reviewUri);

return (
<ReviewThread
parent={data?.parent}
replies={data?.replies ?? []}
totalReplies={data?.totalReplies ?? 0}
/>
);