P
но почему-то он не срабатывает, а функция выше работает четко
Size: a a a
P
P
🦜
P
P
DS
P
P
DS
c
P
MC
to is an array of Units, when to is triggered, each of to will be triggered tooto должен же быть from, да?🦜
to is an array of Units, when to is triggered, each of to will be triggered tooto должен же быть from, да?🦜

🦜
VI
🚀🚀
function customForward<T>({ from, to }: { from: Unit<T>; to: Unit<T> }): Function {
return (from as any).watch((payload: T) => {
const _to = to as any;
if (typeof to === 'function') {
_to(payload);
} else {
_to.setState(payload);
}
});
}P
🚀🚀
🦜