11package com.squareup.workflow1.ui.compose
22
33import androidx.compose.runtime.Composable
4- import com.squareup.workflow1.ui.AndroidScreen
54import com.squareup.workflow1.ui.Screen
65import com.squareup.workflow1.ui.ViewEnvironment
76import com.squareup.workflow1.ui.ViewRegistry
@@ -10,7 +9,16 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
109/* *
1110 * Interface implemented by a rendering class to allow it to drive a composable UI via an
1211 * appropriate [ScreenComposableFactory] implementation, by simply overriding the [Content] method.
13- * This is the compose analog to [AndroidScreen].
12+ *
13+ * Note that it is generally an error for a [Workflow][com.squareup.workflow1.Workflow]
14+ * to declare [ComposeScreen] as its `RenderingT` type -- prefer [Screen] for that.
15+ * [ComposeScreen], like [AndroidScreen][com.squareup.workflow1.ui.AndroidScreen],
16+ * is strictly a possible implementation detail of [Screen]. It is a convenience to
17+ * minimize the boilerplate required to set up a [ScreenComposableFactory].
18+ * That interface is the fundamental unit of Compose tooling for Workflow UI.
19+ * But in day to day use, most developer will work with [ComposeScreen] and be only
20+ * vaguely aware of the existence of [ScreenComposableFactory],
21+ * so the bulk of our description of working with Compose is here.
1422 *
1523 * **NB**: A Workflow app that relies on Compose must call [withComposeInteropSupport]
1624 * on its top-level [ViewEnvironment]. See that function for details.
0 commit comments