---
title: "compose"
description: "Triggers the composition of [content] and returns the result."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


> **Deprecated** glance-wear-tiles is deprecated and will be removed

```kotlin
@ExperimentalGlanceWearTilesApi

public suspend fun compose(
    context: Context,
    size: DpSize,
    state: Any? = null,
    content: @Composable () -> Unit,
): WearTilesCompositionResult
```


Triggers the composition of `content` and returns the result.

#### Parameters

| | |
| --- | --- |
| context | The `Context` to get the resources during glance ui building. |
| state | Local view state that can be passed to composition through `LocalState`. |
| size | Size of the glance ui to be displayed at. |
| content | Definition of the UI. |


#### Returns

| | |
| --- | --- |
|  | Composition result containing the glance ui. |




