Loop icon indicating copy to clipboard operation
Loop copied to clipboard

Add events to the feedbacks

Open sergdort opened this issue 5 years ago • 1 comments

Resurrecting old proposal from @inamiy https://github.com/babylonhealth/ReactiveFeedback/pull/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 https://github.com/Babylonpartners/ReactiveFeedback/pull/32#pullrequestreview-218703551 .

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.

sergdort avatar May 12 '20 15:05 sergdort

@andersio seems like we will need CasePath for that

sergdort avatar May 16 '20 20:05 sergdort