title: What do the @Stable and @Immutable annotations mean in Jetpack Compose?
body: <p>While studying through the Jetpack Compose sample project, I saw <code>@Stable</code> and <code>@Immutable</code> annotations. I've been looking through the <a href="https://developer.android.com/jetpack/compose/lifecycle#skipping" rel="nofollow noreferrer">Android documentation</a> and <a href="https://github.com/androidx/androidx/blob/androidx-main/compose/docs/compose-api-guidelines.md#stable-types" rel="nofollow noreferrer">GitHub</a> about those annotations, but I don't understand.</p>
  <p>From what I understand, if use <code>@Immutable</code>, even if the state is changed, recomposition should not occur. However, as a result of the test, recomposition proceeds.</p>
  <p>What exactly do <code>@Stable</code> and <code>@Immutable</code> annotations do in Jetpack Compose?</p>