Is it possible to create a global custom state that affects multiple elements?
Here is my use case: I want my customer to select one of 6 options (see screenshot). When an image is clicked, the border changes color and once I click next, the element that has been clicked the latest should be stored in my DB. Therefore I would like to create a global custom state that would have 6 options “t-shirt”, “polo”, “sweatshirt”, “hoodie”, “zip hoodie” or “other”. Am I having a good approach?
I tried and succeeded to implement the comportment I wanted by creating one custom state per image, but in the future I might add additional products and the amount of work to adapt and add new products grow exponentially and therefore I am looking for a better alternative.