after Generic blogposts about all the things announced Generic blogpost about what is Jetpack Compose Specific blogpost about Jetpack Compose End of the excitement around Jetpack Compose
describe how to achieve it JETPACK COMPOSE Declarative A tower of 3 blocks. Imperative 1. Put down first block 2. Put down second block 3. Put down third block
composable * elements defined in the given [psiFile]. * * The editor will display previews for all declared * `@Composable` functions that also use the `@Preview` * (see [PREVIEW_ANNOTATION_FQN])annotation. * For every preview element a small XML is generated * that allows Layoutlib to render a `@Composable` functions. * * @param psiFile [PsiFile] pointing to the Kotlin source * containing the code to preview. * @param previewProvider call to obtain the [PreviewElement]s * from the file. */ JETPACK COMPOSE
meant to * wrap around a single value. * It is used in the `+state` and `+stateFor` effects. */ @Model class State<T> @PublishedApi internal constructor(value: T) : Framed {} JETPACK COMPOSE
which represents your * application's data model, and will cause instances of the * class to become observable, such that a read of a property * of an instance of this class during the invocation of a * composable function will cause that component to be * "subscribed" to mutations of that instance. Composable * functions which directly or indirectly read properties * of the model class, the composables will be recomposed * whenever any properties of the the model are written to. */ JETPACK COMPOSE
file bug for when "down" is not a // file level val, it's not memoized correctly val x = down.x val y = down.y val paint = Paint().apply { color = Color( alpha = getAlpha(), red = 0, green = 235,
correctly val x = down.x val y = down.y val paint = Paint().apply { color = Color( alpha = getAlpha(), red = 0, green = 235, blue = 224 ) } val radius = state[radius] Draw { canvas, _ ->
for use with Composables. A Composable that has a `Modifier` * can be considered decorated or wrapped by that `Modifier`. * * Composables that accept a [Modifier] as a parameter to be * applied to the whole component represented by the composable * function should name the parameter `modifier` and assign the * parameter a default value of [Modifier.None] */ JETPACK COMPOSE