Skip to main content

usePage

NameTypeDescription
idStringID of the page
handleObjectA human-friendly unique string for the page automatically generated from its title.
titleFunctionThe title of the page.
bodyHTMLThe description of the page, complete with HTML formatting.
bodySummaryStringSummary of the page body.
onlineStoreUrlStringThe URL used for viewing the resource on the shop's Online Store.
pageDataStringWhole object of response for the page

Usage:

import { usePage } from "@appmaker-xyz/shopify";

const { id, handle, title, body, bodySummary, onlineStoreUrl, pageData } =
usePage({
pageHandle: "hi-how-are-you", // the page handle
});

Refer

https://shopify.dev/docs/api/storefront/2023-07/objects/Page