| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1x 1x 1x 9x 9x 5x 5x 5x 5x | import Rx from '@evo/rx';
export function rethrowFx(action, payload) {
return function (stream) {
stream.send(action, payload)
}
}
export function subcomponentFx(subName, dispatchSub) {
return function (stream) {
stream.subStream(subName, dispatchSub);
}
}
export function childFx(effect, streamName, metadata = null) {
return (streamWrapper) => {
const substream = streamWrapper.subWithMeta(streamName, metadata);
return effect
? effect(substream)
: Rx.helpers.noop;
};
}
|