GX5002: duplicate view-transition-name in one template
Two elements in one template have the same transition name.
Cause
Two elements in one template have the same transition name. The browser does not run a transition when two elements have one name.
Example
package shop
<div>
<img transition={Hero(1)} src="/a.png" alt="First" />
<img transition={Hero(1)} src="/b.png" alt="Second" />
</div>package shop
import "github.com/alternayte/gx"
// Hero pairs the product image of two pages.
var Hero = gx.Transition[int]("hero")gx check reports:
shop/Page.gx:5:20: GX5002: duplicate transition "Hero(1)"; the browser skips a transition with a duplicate nameFix
Give each element a different key, for example Hero(1) and Hero(2).