title: UI List not updating jetpack compose with mutableList but data updates
body: <p>Why is my list not updating? I spent the whole day yesterday, debugging this and researching but I couldn't find anything to help me.
  I have a companion object in my fragment, which is initially an empty mutableList:</p>
  <pre class="lang-kotlin prettyprint-override"><code>class MainTillLayoutFragment : Fragment() {
      companion object {
          var mBasket = mutableListOf&lt;Product?&gt;()
      }
  ...
  }
  </code></pre>
  <p>I have a method called addToBasket. which gets a &quot;Product&quot; item as a parameter and it adds it to the mBasket:</p>
  <pre class="lang-kotlin prettyprint-override"><code>    private fun addToBasket(product: Product) {
          mBasket.add(product)
          println(&quot;PRODUCTS ADDED NEW BASKET IS $mBasket&quot;)
      }
  </code></pre>
  <p>And then I have a composable function that uses mBasket in the items() function to loop through each of the products and display a Text in each row of the lazyColumn:</p>
  <pre class="lang-kotlin prettyprint-override"><code> LazyColumn(
       modifier = Modifier
           .background(color = Color.Red)
           .fillMaxSize(),
       content = {
            items(mBasket) {
                  if (it != null) {
                       Text(text = it.name)
                        }
                  }
           }
     )
  </code></pre>
  <p>The data DOES get updated HOWEVER the UI does NOT, anything wrong with the code above that I should try guys?</p>
  <p>Thanks in advance everyone :)</p>