saveThatHasBeenReviewed(productId: string): void¶
The saveThatHasBeenReviewed method allows to save the information that the product has been reviewed to the local storage.
Input parameters¶
productId¶
string represents the ID of the product to check.
Returned value¶
A returned value has a type of void as this method returns nothing.
Example¶
In this example we make a RateAndReviewApi call to save the information that the product has been reviewed to the local storage.
useStorefront((storefront) => {
const rateAndReviewApi = await storefront.getApi('rateAndReviewApi');
rateAndReviewApi.saveThatHasBeenReviewed("145");
});