Skip to content

✨ feat(availability): deprecate AvailabilityContainer and make standalone component #760

@acasazza

Description

@acasazza

Summary

Do the same changes done for Prices and Skus: deprecate AvailabilityContainer and make the Availability component standalone, so it can fetch data without requiring a container parent.

Work

  • Deprecate <AvailabilityContainer> (keep backwards-compatible)
  • Make <Availability> standalone — accepts skuCode prop and auto-fetches availability without a container
  • Reuse/extend the shared createBatchStore pattern from @commercelayer/core if batching is needed, or use SWR-based single-item fetching (similar to useSkuList)
  • Update useAvailability hook if needed
  • Update docs/stories with standalone usage examples

Reference

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions