title: Jetpack Compose LazyColumn - How to update values of each Item seperately?
body: <p>I'm working on a shopping cart feature for my app. I'm looking to add/decrease quantity of each list item in LazyColumn individually. I'm using only one &quot;remember&quot; so if I click on add/decrease they all update at the same time. How do I control each Item individually?</p>
  <p><a href="https://i.stack.imgur.com/Dgd7V.png" rel="nofollow noreferrer">Screenshot</a></p>
  <pre><code>@Composable
  fun InventoryCartScreen(
      mainViewModel: MainViewModel = hiltViewModel()
  ) {
  
      val multiSelectValue = mutableStateOf(0)// This is the value I want to change
  
  //random list
  val shopList = listOf(
          ShoppingList(id = 0,itemNumber = &quot;1&quot;,itemDescription = &quot;1&quot;,currentInventory = 0,optimalInventory = 0,minInventory = 0),
          ShoppingList(id = 0,itemNumber = &quot;2&quot;,itemDescription = &quot;2&quot;,currentInventory = 0,optimalInventory = 0,minInventory = 0)
      )
  
      Column(...) {
         LazyColumn(...) {
              items(items = shopList, key = { it.id }) { item -&gt;
                  InventoryCartScreenContents(
                      onaddClick= { multiSelectValue.value ++ }, //adds for all
                      onDecreaseClick = { multiSelectValue.value -- }, //decreases for all
                      value = multiSelectValue.value //setting the initial value for all
                  )
  
              }
  
          }
      }
  }
  
  </code></pre>
  <p>Below is the contents composable to help you reproduce the issue.</p>
  <pre><code>@Composable
  fun InventoryCartScreenContents(
      onAddClick: (Int) -&gt; Unit,
      onDecreaseClick: () -&gt; Unit,
      value: Int,
  ) {
             Row(...) {
                  Button(
                      onClick = { onAddClick(itemId) }
                  ) {
                      Text(text = &quot;+&quot;)
                  }
                 
                  Button(
                      onClick = onDecreaseClick
                  ) {
                      Text(text = &quot;-&quot;)
                  }
                 
                  }
  
              }
  
  </code></pre>