i created a layerlist widget as so:
this.layerList = new LayerList({
view: this.view,
selectionEnabled: true,
});
and then added it to ui.
I have bunch of featurelayers, mapimagelayers,grouplayers etc now loaded on the map.
The user rearranges the layer in the widget list as they choose fit, is it possible to find out which layer was changed?