useFirstDrawReporter

Provides a persistent FirstDrawReporter instance to trigger onDrawn callback immediately after the first draw for a given component. To bind returned reporter with a component, pass it via the Style.reportFirstContentDraw prop.

Example:

class MainScreen : KComponent() {
  override fun ComponentScope.render(): Component {
    val uiState = useFlow(...)
    val reporter = useFirstDrawReporter {
      // mark TTRC end
    }

    return if (uiState.isLoading) {
      LoadingUi()
    } else {
      ContentUi(
          data = uiState.items,
          style = Style.reportFirstContentDraw(reporter)
      )
    }
  }
}