Components with ids assigned from variables always have their internal id's sent to client even if unchanged

I’ve been optimizing the amount of data sent by LV to the client and so far I managed to reduce it to the bare minimum except for one detail.

When live components get rendered as siblings within a comprehension in a container, when the state of one of them changes LV sends it to the client along with an array of its internal component ids for each and every of the components even if the change occurred in just one of them (see below). I regularly pass a unique id to live_component and I guess it’s all ok for if didn’t I would get the entire components re-rendered entirely.

@chrismccord Am I doing something wrong and is there a way to avoid this?

Thanks

{
  
  ..
  
  "c": {
    "20": {
      "18": {
        "d": [
          [
            334
          ],
          [
            335
          ],
          [
            336
          ],
          [
            337
          ],
          [
            338
          ],
          
          ..
          
          [
            350
          ]
        ]
      }
    },
    "337": {
      "11": {
        "0": "O",
        "1": "#1772",
        "2": "O",
        "3": "#1772",
        "4": "The Value"
      }
    }
  }
}

Might need to see more of the controller/view and template code.

Thanks for the reply. I think I figured out where the problem is. I forgot (again) to make the container’s phx-update=“append” and then (temporary-) assign just the state of the components that actually changed, not all of them.

Stumbled over this one more than once. It cannot be stressed enough how important this pattern is in LV.