formatStateUsing on simple repeater component

Is there a reasonable way to apply formatStateUsing to the component in a simple repeater, without reimplementing the logic in the repeater to format the array with UUID keys?

Applying it directly to the component fails, as formatStateUsing/afterStateHydrated are called on the child component before the repeater component is hydrated, so $state is always null.

Applying it to the repeater itself requires reimplementing the logic in Repeater::afterStateHydrated to assign UUIDs to each array, which seems fragile.
Was this page helpful?