Skip to content

Commit

Permalink
Update kdoc on Android flavor of renderWorkflowIn
Browse files Browse the repository at this point in the history
Warn about surprising effects of having a `data class` as your root rendering.

Fixes #822
  • Loading branch information
rjrjr committed Jul 16, 2024
1 parent 2d2c171 commit 6b32cb4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import kotlinx.coroutines.flow.stateIn
* An Android `ViewModel`-friendly wrapper for [com.squareup.workflow1.renderWorkflowIn],
* for use with a [workflow] that takes no input (that is, has `PropsT` set to [Unit]).
*
* **WARNING** Note that this function returns a `StateFlow<RenderingT>`, and bear in mind
* that `StateFlow` short swallows updates to new values that are [equals] to the current
* one -- which is likely to be the case most of the time if your root `RenderingT`
* implementation is a `data class`.
*
* @OptIn(WorkflowUiExperimentalApi::class)
* class HelloWorkflowActivity : AppCompatActivity() {
* override fun onCreate(savedInstanceState: Bundle?) {
Expand Down

0 comments on commit 6b32cb4

Please sign in to comment.