Skip to main content

ShoppablePosts

@shopify/shop-minis-platform-sdk / templates/ShoppablePosts/ShoppablePosts

ShoppablePostsProps\<ItemType>

Extends

Type Parameters

Type Parameter
ItemType

Properties

fetchMoreByProductIds()?

optional fetchMoreByProductIds: (productIds) => ItemType[]

Parameters
ParameterType
productIdsstring[]
Returns

ItemType[]

fetchMoreByShopId()?

optional fetchMoreByShopId: (shopId) => ItemType[]

Parameters
ParameterType
shopIdstring
Returns

ItemType[]

initialItems

initialItems: ItemType[]

onShopLoaded()?

optional onShopLoaded: (shop) => void

Callback fired once when the information of the Shop is retrieved

Parameters
ParameterType
shopnull | Shop
Returns

void

Inherited from

ShoppablePostsCustomisationProps.onShopLoaded

renderHeader()?

optional renderHeader: () => null | ReactElement\<any, string | JSXElementConstructor\<any>>

Render function to overwrite the top header of the template

Returns

null | ReactElement\<any, string | JSXElementConstructor\<any>>

Inherited from

ShoppablePostsCustomisationProps.renderHeader

renderItem()?

optional renderItem: (params) => null | ReactElement\<any, string | JSXElementConstructor\<any>>

Render function to overwrite the whole UI of each post

Parameters
ParameterType
paramsobject
params.indexnumber
params.itemItemType
Returns

null | ReactElement\<any, string | JSXElementConstructor\<any>>

Inherited from

ShoppablePostsCustomisationProps.renderItem

renderMedia()?

optional renderMedia: (params) => null | ReactElement\<any, string | JSXElementConstructor\<any>>

Render function to overwrite the media component of each post. Useful if you want to use the template to render other kinds of media like videos.

Parameters
ParameterType
paramsobject
params.itemItemType
Returns

null | ReactElement\<any, string | JSXElementConstructor\<any>>

Inherited from

ShoppablePostsCustomisationProps.renderMedia

renderMediaFooter()?

optional renderMediaFooter: (params) => null | ReactElement\<any, string | JSXElementConstructor\<any>>

Render function to overwrite the footer of each post

Parameters
ParameterType
paramsobject
params.itemItemType
Returns

null | ReactElement\<any, string | JSXElementConstructor\<any>>

Inherited from

ShoppablePostsCustomisationProps.renderMediaFooter

shopId

shopId: string


ShoppablePostsStackParamList\<ItemType>

Extends

  • ParamListBase

Type Parameters

Type ParameterDefault type
ItemTypeunknown

Properties

CrossMerchantFeed

CrossMerchantFeed: undefined

MerchantFeed

MerchantFeed: object

externalID

externalID: string

initialItems?

optional initialItems: ItemType[]

shopGID?

optional shopGID: string

MerchantGrid

MerchantGrid: object

storeInfo

storeInfo: BaseShopFragmentData


ShoppablePosts()

ShoppablePosts\<ItemType>(__namedParameters): Element

Type Parameters

Type ParameterDefault type
ItemType extends ShoppablePostsItemShoppablePostsItem

Parameters

ParameterType
__namedParametersShoppablePostsProps\<ItemType>

Returns

Element