OlivierBlanvillain / monadic-html

Tiny DOM binding library for Scala.js
https://olivierblanvillain.github.io/monadic-html/examples/
MIT License
225 stars 24 forks source link

feature suggestion: lazy merge #99

Open antonkulaga opened 6 years ago

antonkulaga commented 6 years ago

Merge is often used for complex wiring for patterns like redux, there the default behavior of running all initial values through is very annoying. I would be happy to have an alternative merge that will not put all initial values through itself but will just start from the initial value of the last merged element.

OlivierBlanvillain commented 6 years ago

Sounds reasonable. Do you think there is a case to keep both the current merge and a lazy variant? Updating the current merge to only output value from the right Rx sounds good to me.

antonkulaga commented 6 years ago

Both are good to me. For my use case I only need lazy merge, but I do not know if anybody needs merge in its current form for some other use-cases

fizzy33 commented 6 years ago

fwiw lazy merge is what I would idiomatically use. I don't have any uses cases that need the current behaviour.