AppmakerDeveloper

useReviewSummary

Average rating, review and question counts, and the rating breakdown for a product.

sample usage:

  const {
    average_rating,
    total_questions,
    total_reviews,
    ratings,
    productId,
    openAddReview,
    isLoading,
  } = useReviewSummary(props);

Hook return data

NameDescription
average_ratingAverage Review with 1 decimal point
total_reviewsTotal number of reviews
productIdCurrent product ID
ratingsArray of object with ratings data, sample: [{ rating, percentage, count}]
total_questionsTotal number of questions
onShowFullReviewFunction to Open review list
openAddReviewFunction to Open add review page
isLoadingBoolean value to show loading while data is being retrieved

On this page