title: How to observe LiveData of a ViewModel that is not initialized during init / constructor (Room suspend function)
body: <p>My <code>ViewModel</code> loads data via <code>Room</code> in a coroutine:</p>
  <pre><code>// ViewModel:
  lateinit var items : LiveData&lt;List&lt;Item&gt;&gt;
      private set
  
  init {
      viewModelScope.launch(IO) {
          items = MyDatabase.getInstance(MyApplication.getContext()).itemsDao.getAllItems()
      }
  }
  
  // Fragment:
  viewModel.items.observe(viewLifecycleOwner, Observer {
      it?.let {
          adapter.submitList(it)
      }
  })
  </code></pre>
  <p>This leads to</p>
  <pre><code>kotlin.UninitializedPropertyAccessException: lateinit property items has not been initialized
  </code></pre>
  <p>I understand this error - the <code>Fragment</code> tries to access the <code>items</code> property before the coroutine is finished, fine.</p>
  <p>But how do I solve this? How do I observe the data of a <code>ViewModel</code> that is actually provided by a coroutine at a later point in time? Note that I want my query <code>itemsDao.getAllItems()</code> to remain a suspend function (no UI freezing).</p>