Setting the file. One moment.
Subchapter 1.27
references/context-provider/VERTICAL_CONTEXTS.mdMarkdown10 KBView on GitHub
Contexts that Wix business solutions (Stores, Blog, Bookings, Events) already provide on Studio Two sites. Read one of these instead of building a provider that fetches or collects the same data — the data is already on the page, and the Wix SDK is not the way to get it.
Types and descriptions come from the installed packages. Open the file for the context you need; it lists every hook, its import specifier, and the properties it returns. A context with a long property list is split across numbered files, all linked in the table.
@wix/*@wix/stores/context/product. Never guess one; copy it from the vertical’s file.@wix/stores/context/product-list for a product list). Never fetch it with the Wix SDK (productsV3.queryProducts(), posts.queryPosts()) in a provider or component: Manage Data and Manage Items work only on a context or Data Source, so an SDK fetch makes Manage Data open Code Mode, Manage Items do nothing, and the element render empty.@wix/stores/...). Check the site’s installed apps first. If the solution is missing, tell the user to install it and stop. If the platform rejects the code with Missing dependencies: <id> (@wix/stores/context/<name>) for app <id>, do not retry, rewrite or delete the context: name the missing dependency in your final message.package.json and node_modules/@wix/<vertical> are on the latest version (npm install @wix/<vertical>@latest), and confirm: grep '"./context/<name>"' node_modules/@wix/<vertical>/package.json. Never put // @ts-ignore above these imports. TS2307 Cannot find module '@wix/<vertical>/context/<name>' means the package is too old: upgrade it, never fall back to an SDK fetch.post-item to post-list-item (hook usePostListItemContext) by @wix/blog 1.0.708, and added post-by-slug, whose usePostBySlugContext returns the same properties as usePostContext. Use the new names.optional: true also has a no-argument form. The package’s own examples call useServiceContext(), which returns the value and throws outside its area; optional: true returns null instead. Read the installed .d.ts for the exact overloads.| Vertical | Specifier | Hooks | Files |
|---|---|---|---|
| Stores | @wix/stores/context/category-by-id | useCategoryByIdContext | category-by-id.md |
| Stores | @wix/stores/context/category-by-slug | useCategoryBySlugContext | category-by-slug.md |
| Stores | @wix/stores/context/category-info | useCategoryInfoContext | category-info.md |
| Stores | @wix/stores/context/category-list | useCategoryListContext | category-list.md |
| Stores | @wix/stores/context/product-by-id | useProductByIdContext | product-by-id.md, product-by-id-2.md, product-by-id-3.md, product-by-id-4.md, product-by-id-5.md, product-by-id-6.md |
| Stores | @wix/stores/context/product-by-slug | useProductBySlugContext | product-by-slug.md, product-by-slug-2.md |
| Stores | @wix/stores/context/product-item | useProductItemContext, useProductItemContextValue | product-item.md, product-item-2.md, product-item-3.md |
| Stores | @wix/stores/context/product-list | useProductListContext | product-list.md, product-list-2.md, product-list-3.md |
| Stores | @wix/stores/context/product | useProductContext | product.md, product-2.md |
| Stores | @wix/stores/context/promotion-item | usePromotionItemContext | promotion-item.md |
| Blog | @wix/blog/context/blog-feed | useBlogFeedContext | blog-feed.md, blog-feed-2.md |
| Blog | @wix/blog/context/category-item | useCategoryItemContext | category-item.md |
| Blog | @wix/blog/context/post-by-id | usePostByIdContext | post-by-id.md, post-by-id-2.md |
| Blog | @wix/blog/context/post-list-item | usePostListItemContext | post-list-item.md |
| Blog | @wix/blog/context/post-by-slug | usePostBySlugContext (same properties as usePostContext) | post.md |
| Blog | @wix/blog/context/post | usePostContext | post.md |
| Blog | @wix/blog/context/related-posts | useRelatedPostsContext | related-posts.md |
| Blog | @wix/blog/context/tag-item | useTagItemContext | tag-item.md |
| Bookings | @wix/bookings/context/booking-checkout | useBookingCheckoutContext | booking-checkout.md |
| Bookings | @wix/bookings/context/categories | useCategoriesContext | categories.md |
| Bookings | @wix/bookings/context/locations | useLocationsContext | locations.md |
| Bookings | @wix/bookings/context/service-addons | useServiceAddOnsContext | service-addons.md |
| Bookings | @wix/bookings/context/service | useServiceContext | service.md, service-2.md, service-3.md, service-4.md, service-5.md |
| Bookings | @wix/bookings/context/time-slots | useTimeSlotsContext | time-slots.md, time-slots-2.md, time-slots-3.md |
| Bookings | @wix/bookings/context/services | useServicesContext | services.md |
| Events | @wix/events/context/event-by-id | useEventByIdContext | event-by-id.md, event-by-id-2.md, event-by-id-3.md, event-by-id-4.md, event-by-id-5.md, event-by-id-6.md |
| Events | @wix/events/context/event-by-slug | useEventBySlugContext | event-by-slug.md, event-by-slug-2.md, event-by-slug-3.md |
| Events | @wix/events/context/event-item | useEventItemContext | event-item.md, event-item-2.md, event-item-3.md |
| Events | @wix/events/context/event-list | useEventListContext | event-list.md |
| Events | @wix/events/context/registration | useRegistrationContext | registration.md |
| Events | @wix/events/context/event | useEventContext | event.md, event-2.md, event-3.md |
| Events | @wix/events/context/seating | useSeatingContext | seating.md |
| Events | @wix/events/context/thank-you | useThankYouContext | thank-you.md, thank-you-2.md, thank-you-3.md, thank-you-4.md |