abdulhannanali / shopify-js-store

Shopify store which uses JavaScript Buy SDK
MIT License
2 stars 2 forks source link

Remove storing mutable products object in the state #7

Open abdulhannanali opened 7 years ago

abdulhannanali commented 7 years ago

The state should be immutable and storing immutable deeply nested objects returned by Shopify SDK can bring a lot of complications, and won't rerender the UI for us, it's okay if we aren't using Immutable but reading off the UI state from the products object won't let us rerender the product when some change occurs to it's option, giving another variant product.