ReactiveCocoa/Loop

Add events to the feedbacks

sergdort opened this issue · 1 comments

Resurrecting old proposal from @inamiy babylonhealth/ReactiveFeedback#41

This is an additive change to add Optional<Event> argument in Feedback so that unnecessary intermediate states will no longer be required.

Event-driven feedback will be useful for following scenarios, without needing to add a new state and then transit (and transit back again):

  • Logging
  • Analytics
  • Routing
  • Image loader (but not managing its internal states)

This is a change from Moore model to (kind of) Mealy model as discussed in babylonhealth/ReactiveFeedback#32 (review) .

Please note that reducer and feedback are still in sequence, not parallel.

Also, please note that Optional<Event> is used here as a workaround since it requires more breaking changes to minimize into non-optional Event.

@andersio seems like we will need CasePath for that