DEV Community

Cover image for Messy Event Flows: Part 2 - What it should be

Messy Event Flows: Part 2 - What it should be

Barry O Sullivan on August 21, 2017

So, last time we looked at our event flow, and I went into detail about the problems we've had with it. The next step was to remodel our event flow...
Collapse
 
eonist profile image
Eon

What about RX?

Collapse
 
barryosull profile image
Barry O Sullivan

Good suggestion. Reactive Extensions (RX) is a great way to implement your projectors, it makes it easy to build up the state required by your constraints.

Collapse
 
eonist profile image
Eon

But debugging RX can send you into back holes iv'e heard. Thoughts on this?

Thread Thread
 
barryosull profile image
Barry O Sullivan

We don't use RX to implement projectors, so I can't really answer this. I've used it in the past, so can I imagine it would get difficult. For projectors, a simple implementation of the observer pattern tendsto works well.

React reducers are pretty much projectors, so their implementation is a good place to see it in action.

redux.js.org/docs/basics/Reducers....