jim09/17/2020, 9:14 AM
takes in a
, which is (as the name suggests) mutable, so Compose can't know if that list has been modified or not, so it needs to be conservative and rerun that code. If you use a list implementation that is stable (like
is less likely to run. Having said that, keep in mind that your code should NEVER make assumptions about when composables will run. Compose is free to run composable functions for any reason and at any time, at its sole discretion.