renderEach

inline fun <V> Flow<List<V>>.renderEach(noinline idProvider: IdProvider<V, *>? = null, into: RenderContext? = null, crossinline content: RenderContext.(V) -> RenderContext)

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

content

RenderContext for rendering the data to the DOM

inline fun <V> Store<List<V>>.renderEach(noinline idProvider: IdProvider<V, *>, into: RenderContext? = null, crossinline content: RenderContext.(Store<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 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

inline fun <V> Store<List<V>>.renderEach(into: RenderContext? = null, crossinline content: RenderContext.(Store<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

into

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