1

Import the VeltCommentThread component and the useCommentAnnotations() hook.

Import the VeltCommentThread component and the useCommentAnnotations() hook.

import { VeltCommentThread, useCommentAnnotations } from '@veltdev/react';
2

Retrieve all Comment Annotation Ids

Retrive all Comment Annotations using the useCommentAnnotations() hook.

To learn more about the useCommentAnnotations() hook, read here.

let commentAnnotations = useCommentAnnotations()
3

Add the VeltCommentThread component

Add the VeltCommentThread component and pass in the Comment Annotation Ids.


let commentAnnotations = useCommentAnnotations()

return (
  <div>
    {commentAnnotations.map((x,i) => <VeltCommentThread key={i} annotationId={x.annotationId}/>)}
  </div>
)