Renaming "Reducer" to "ActionHandler" for clarity

The Elm Architecture is based on exactly same concepts. Where the Reducer is called * Update — a way to update your state based on messages.

I feel StateUpdater (or just Updater) would be a better fit than ActionHandler.


FWIW in Haskell reduce is called foldl (with its counterpart foldr, which reduces in the opposite direction), and types that implement it are called Foldable. Unfortunately, it's not possible to express Foldable (or Reduceable) protocol in Swift due to limitations of its type system.

And given the long history of this concept in FP, "Fold" name could've become more prevalent, but it looks like "Reduce" won as a name when MapReduce became popular in big data in early 2010s.


Please keep Reducer +1, from my view, the terminologies in TCA are clear and easy to understand, especially when I have worked on several other Redux-like frameworks, those conceptions from pure functional programming are great to explain themselves.

1 Like
Terms of Service

Privacy Policy

Cookie Policy