Optionalpattern: ActionPatternSame as take(pattern) but does not automatically terminate the Saga on an
END action. Instead all Sagas blocked on a take Effect will get the END
object.
takeMaybe got its name from the FP analogy - it's like instead of having a
return type of ACTION (with automatic handling) we can have a type of
Maybe(ACTION) so we can handle both cases:
Just(ACTION) (we have an action)NOTHING (channel was closed*). i.e. we need some way to map
over ENDinternally all dispatched actions are going through the stdChannel which
is getting closed when dispatch(END) happens
Optionalpattern: ActionPattern<A>
Same as
take(pattern)but does not automatically terminate the Saga on anENDaction. Instead all Sagas blocked on a take Effect will get theENDobject.Notes
takeMaybegot its name from the FP analogy - it's like instead of having a return type ofACTION(with automatic handling) we can have a type ofMaybe(ACTION)so we can handle both cases:Just(ACTION)(we have an action)NOTHING(channel was closed*). i.e. we need some way to map overENDinternally all
dispatched actions are going through thestdChannelwhich is getting closed whendispatch(END)happens