An array field's change listener runs whenever any of its subfields changes. However, consumers may only be interested in changes to the array itself, such as moving an item, rather than changes to the values inside each item.
It would be useful to provide a dedicated listener for these array-level operations. This would let consumers react to changes in the array's structure or ordering without also handling every nested field change.
Some thoughts
One possible implementation is to trigger the listener from changes to _arrayVersion. Whether that internal value should be exposed directly or used behind a higher-level listener API is open for discussion.
An array field's change listener runs whenever any of its subfields changes. However, consumers may only be interested in changes to the array itself, such as moving an item, rather than changes to the values inside each item.
It would be useful to provide a dedicated listener for these array-level operations. This would let consumers react to changes in the array's structure or ordering without also handling every nested field change.
Some thoughts
One possible implementation is to trigger the listener from changes to
_arrayVersion. Whether that internal value should be exposed directly or used behind a higher-level listener API is open for discussion.