0

What will be the equivalent of

return Rx.Observable.merge([deleteTodo$, addTodo$, completeTodo$]).startWith([])
  .scan(function (currentTodos, modifier) { return modifier(currentTodos); });

the above in rxjs in xstream?

mplungjan
  • 169,008
  • 28
  • 173
  • 236
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125

1 Answers1

2

Should be like this. Initial value included as second argument after a function.

xs.merge(deleteTodo$, addTodo$, completeTodo$) .fold(function (currentTodos, modifier) { return modifier(currentTodos); }, [])

Ebuall
  • 1,306
  • 1
  • 12
  • 14