I am using amp-bind with setState to update the amp-img URLs for different swatches at https://beta.webfast.co/magma/collections-galaxy.html
However, even though I am updating specific variables such as s0, there are other divs that are getting updated which isn't the intent.
- Visit https://beta.webfast.co/magma/collections-galaxy.html
- Scroll to product that has title "Last Resort Men's Tee" (the div on the left)
- Click on the first swatch that has the color white.
- The product image div to the right of the swatch disappears.
- The neighboring div image should not be affected.
Turns out, setState needs to have a default value, adding:
helped fix the issue.
Reference: https://github.com/ampproject/amphtml/issues/28857