singleTile

fun <T> singleTile(block: suspend Mosaic.() -> T): Tile<T>(source)

Creates a single-value tile using the DSL.

Return

A new Tile instance

val userTile = singleTile {
userService.getCurrentUser()
}

Parameters

block

A suspending function that produces the tile's value

Type Parameters

T

The type of value this tile produces