renderEach

open fun <V> Flow<List<V>>.renderEach(idProvider: IdProvider<V, *>? = null, into: Tag<HTMLElement>? = null, batch: Boolean = false, content: RenderContext.(V) -> Tag<HTMLElement>)

Renders each element of a Flows content. Internally the Patches are determined using Myer's diff-algorithm. This allows the detection of moves. Keep in mind, that no Patch is derived, when an element stays the same, but changes its internal values.

Parameters

idProvider

function to identify a unique entity in the list

into

target to mount content to. If not set a child div is added to the Tag this method is called on

batch

hide into while rendering patches. Useful to avoid flickering when you make many changes (like sorting)

content

RenderContext for rendering the data to the DOM


open fun <V> Store<List<V>>.renderEach(idProvider: IdProvider<V, *>, into: Tag<HTMLElement>? = null, content: RenderContext.(Store<V>) -> HtmlTag<HTMLElement>)

Renders each element of a Stores List content. Internally the Patches are determined using Myer's diff-algorithm. This allows the detection of moves. Keep in mind, that no Patch is derived, when an element stays the same, but changes its internal values.

Parameters

idProvider

function to identify a unique entity in the list

into

target to mount content to. If not set a child div is added to the Tag this method is called on

content

RenderContext for rendering the data to the DOM