Hi, Can we cache any item of LazyColumn{} ? ```LazyColumn( modifier = Modifier.fillMaxSize() ) {...
k
Hi, Can we cache any item of LazyColumn{} ?
Copy code
LazyColumn(
    modifier = Modifier.fillMaxSize()
) {
    ... other items
    item{} // i want to cache this item and it should not reloaded or recreated 
}
m
If content the item is based on does not change, and yu handle state properly, then the item will be cached automatically. Compose only renders objects when the state they depend on changes. So add a key to the items, and you'll get caching behavior.
m
yes. you can use PinnableContainer API to 'cache' composables