@laserware/stasis
    Preparing search index...

    Function takeMaybe

    • Same 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:

      • case when there is a Just(ACTION) (we have an action)
      • the case of NOTHING (channel was closed*). i.e. we need some way to map over END

      internally all dispatched actions are going through the stdChannel which is getting closed when dispatch(END) happens

      Parameters

      • Optionalpattern: ActionPattern

      Returns TakeEffect

    • Same 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:

      • case when there is a Just(ACTION) (we have an action)
      • the case of NOTHING (channel was closed*). i.e. we need some way to map over END

      internally all dispatched actions are going through the stdChannel which is getting closed when dispatch(END) happens

      Type Parameters

      • A extends Action

      Parameters

      • Optionalpattern: ActionPattern<A>

      Returns TakeEffect

    • Same as take(channel) but does not automatically terminate the Saga on an END action. Instead all Sagas blocked on a take Effect will get the END object.

      Type Parameters

      • T

      Parameters

      • channel: TakeableChannel<T>
      • OptionalmulticastPattern: Pattern<T>

      Returns ChannelTakeEffect<T>