When we add more functional composition tools to our belt, we can start composing usecase pipelines that are both terse and descriptive.

Part of Functional Programming: Clean architecture and DDD series

Operators

  • From previous article: map: (value => newValue) => Result<newValue, ...>
  • flatMap: (value => newResult) => newResult
  • toTup: (value =>…

We can improve our error handling and composition by leveraging a Result class and several other tools from the functional programming world.

Part of Functional Programming: Clean architecture and DDD series

Instead of throwing errors, we wrap our results. Either the Result is an Error value, or a Success value…

Recently, often the question is asked if Hooks and Context replaces Redux. It is more a question of do you need Redux, and perhaps how Hooks and Context can help you write cleaner, more functional, more composable code.

Part of Of Hooks and Screens series

Hooks by themselves are an…

Patrick Roza

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store