We were adding data-cid as if it was a key to an external library that has to be agnostic to Brisa.
data-cid was incorrect as a key, because in the same component there can be different elements with different actions and then there would be a conflict of repeated keys.
To solve this, the best is to generate a key during the render (only if it is not already defined), and that this one is unique. This way I have been able to revert the change in the diffing library without this case of data-cid and at the same time it solves the problem.
Fixes https://github.com/brisa-build/brisa/issues/558
With the previous fix there were 2 problems:
data-cid
as if it was a key to an external library that has to be agnostic to Brisa.data-cid
was incorrect as akey
, because in the same component there can be different elements with different actions and then there would be a conflict of repeated keys.To solve this, the best is to generate a
key
during the render (only if it is not already defined), and that this one is unique. This way I have been able to revert the change in the diffing library without this case ofdata-cid
and at the same time it solves the problem.