Reputation: 1777
The docs go over imitate use case, but I don't understand the example made. Where would you call a Parent function, is it like recursive? I'd like to see what the model function looks like, and what the child gets out of it.
Upvotes: 0
Views: 28
Reputation: 13994
imitate
is meant to create a cycle in the graph of streams connected by operators, that's the use case. It would often be seen when building a state stream.
However, nowadays we have a solution in Cycle.js called @cycle/state
which solves for that use case, and in Cycle.js there is no need for imitate
anymore. We would like to deprecate imitate
but we have heard some people still depend on it, so we're postponing the deprecation.
(I'm the creator of xstream and Cycle.js)
Upvotes: 1