I’ll add that the process of moving to AC2 has a way of exposing poor coding practices (at least it did for me!)
Mostly, it will highlight timing issues.
Here is a very simple example:
Previous code that worked under AC1 but (properly) failed under AC2
dmx-on:click="each_meal_type.remove($index);meal_type_ids_to_delete.addUniq(meal_type_id)"
As you can see it is 2 actions that are fired off together immediately since they are not in a flow. It removes an item from a form repeat, and also adds the id of the removed item to an array.
However with the improvements in AC2, things move much faster. In this case, the id needed from the form repeat item, is now gone (removed on the first action) by the time it attempts to add it to the array on the second action.
The solution here is to use a flow which will first add the item to the array, and then remove from the form repeat.
dmx-on:click="run([{run:{outputType:'text',action:`meal_type_ids_to_delete.addUniq(meal_type_id)`}},{run:{outputType:'text',action:`each_meal_type.remove($index)`}}])"
Given that my app is probably 5 years old now, I found several patterns I used like this that must now be cleaned up.
I’ll also add that I have AC2 in production for the last week, and I really appreciate the speed improvements…they are noticeable if you have heavy client side processing.