Redux totally has middleware (you actually need middleware for async actions).
Redux totally has middleware (you actually need middleware for async actions).
> I didn't think it had the equvalent of Reagent's reactions until I got towards the bottom of the react-redux page
Is that the subscription mechanism? I have yet to find a use for it...
The two use the same model but are organized differently so it throws me off a bit.
Re-frame chooses to hide the actual reduction step so instead of the big switch statement you have a bunch of registered event handlers, which are pure functions take the state and event and return the new state. The middleware is HoF around these so it's done per-handler as well as at the base reducer level, which turns out to be really good for code reuse.
> Is that the subscription mechanism? I have yet to find a use for it...
I think they call it selections. Reactions let you transform a normalized data model into a shape that's useful for the components. They also let you build up chains of reusable calculations/conditions to shift complex conditionals out of the components and into the model code so its co-located with the handlers, which are split up by the part of the app they work with (credentials, search, nav, etc).