renderEach

fun <V, I> Flow<List<V>>.renderEach(idProvider: IdProvider<V, I>, content: RenderContext.(V) -> RenderContext)

Renders each element of a List. 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 it's internal values.

Parameters

idProvider

function to identify a unique entity in the list

content

RenderContext for rendering the data to the DOM

fun <V> Flow<List<V>>.renderEach(content: RenderContext.(V) -> RenderContext)

Renders each element of a List. Internally the Patches are determined using instance comparison. This allows the detection of moves. Keep in mind, that no Patch is derived, when an element stays the same, but changes it's internal values.

Parameters

content

RenderContext for rendering the data to the DOM

fun <V, I> RootStore<List<V>>.renderEach(idProvider: IdProvider<V, I>, content: RenderContext.(SubStore<List<V>, V>) -> RenderContext)

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 it's internal values.

Parameters

idProvider

function to identify a unique entity in the list

content

RenderContext for rendering the data to the DOM

fun <V> RootStore<List<V>>.renderEach(content: RenderContext.(SubStore<List<V>, V>) -> RenderContext)
fun <P, V> SubStore<P, List<V>>.renderEach(content: RenderContext.(SubStore<List<V>, V>) -> RenderContext)

Renders each element of a Stores list content. Internally the Patches are determined using the position of an item in the list. Moves cannot be detected that way and replacing an item at a certain position will be treated as a change of the item.

Parameters

content

RenderContext for rendering the data to the DOM given a Store of the list's item-type

fun <P, V, I> SubStore<P, List<V>>.renderEach(idProvider: IdProvider<V, I>, content: RenderContext.(SubStore<List<V>, V>) -> RenderContext)

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 it's internal values.

Parameters

idProvider

function to identify a unique entity in the list

content

RenderContext for rendering the data to the DOM given a Store of the list's item-type