v0.14.134 - 33.7 / 33.3

map

Reactive helper that runs a callback only on new or modified entries. The problem of doing {array.map(item => <li>{item}</li>)}is that is doesnt react when the array is modified (items added/modified/deleted), as that would require to recreate the whole array. For this reason map exists.

# Arguments

nametypedescription
itemssignal/iterable object a signal whose value is iterable
callbackfncallback to run on each item

# map test

Modifying an array and getting reactive changes

# map types

map works with Array, Set and Map