Remove send function from signature, and switch argument order.
The new function signature mirrors the signature of Lit's repeat.
Intended use:
repeat(states, MyView)
repeat(states, state => MyView2(state, send))
repeat(states, state => {
const taggedSend = tag(send, state().id)
return MyView3(state, taggedSend))
})
It's better to allow the parent view to use closure to pass down a
send function if needed. This gives more flexibility to pass down a
mapped or unmapped send function, or no send function at all.
Remove send function from signature, and switch argument order. The new function signature mirrors the signature of Lit's repeat.
Intended use:
It's better to allow the parent view to use closure to pass down a send function if needed. This gives more flexibility to pass down a mapped or unmapped send function, or no send function at all.