I verified a different recomposition behavior betw...
# compose
d
I verified a different recomposition behavior between
1.0.0-beta07
and
1.0.0-beta08
This is the code:
Copy code
LazyColumn {
    stickyHeader {
        CountriesListHeader()
    }
    items(items = countriesListState.countriesListItems, itemContent = { item ->
        CountriesListRow(
            item = item,
            favorite = countriesListState.favoriteCountries.containsKey(item.name)
    })
}
In case
countriesListItems
hasn’t changed but
favoriteCountries
has changed: • in beta07,
items
recompose (and that’s what I would expect, as in
CountriesListRow
the
favorite
parameter depends on
favoriteCountries
) • in beta08,
items
don’t recompose, as it seems Compose is just monitoring changes of
countriesListItems
and not
favoriteCountries
Is this a bug, or I should structure my code differently?
s
It happens to me too (
LazyVerticalGrid
). Composition does not fire after items list gets cleared
d
v
Happened to me too. Updated to latest dev branch (
7437341
at that time) and the issue was gone. So hopefully this is fixed in beta09
👍🏽 1
👍 1
Please try https://androidx.dev/ and see if it helps
r
This issue seems to have been fixed in the latest version
👍 1