useFetchComments
Overview
TheuseFetchManyComments
hook allows you to retrieve a list of comments based on various filters, such as the associated entity, user, or parent comment. It supports sorting, pagination, and optional inclusion of the related entity data.
Usage Example
Parameters & Returns
Parameters
The hook returns a function that accepts an object with the following fields:undefined`
undefined`
undefined`
The sorting criteria for comments (e.g.,
top
, new
). Defaults to ‘new’.The page number for pagination.
No
No
Returns
The function resolves with an array of comments:A list of comments matching the criteria.