Skip to content

Optimize priceFormatter initialization #1033

Description

@aboedo

After #1028, the priceFormatter computed var in StoreProduct returns a new formatter for every product.

This could be optimized by having a single, shared formatter, and listening for storefront changes (Storekit 2 version here, StoreKit 1 version here). When the storefront changes, we would reset the shared formatter, so that when the next product loads up, we create a new one.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions