Patrick Dubroy
@dubroy
Is there a name for this pattern popularized by React?

1️⃣ Produce a description of the desired state of a mutable resource, and
2️⃣ a reconciler which mutates the resource to match the description.

Terraform is also similar.

IMO it's also a nice pattern for making testable APIs
Tweet image
Sep 27, 2021 · 2

The Command pattern is similar in some ways, and can achieve some of the same goals, but with CP you:

1️⃣ Produce a list of actions (commands) to achieve the desired state, and
2️⃣ interpret the commands and perform the actual mutation.

Ok, I guess it's called the *reconciler pattern*: oreilly.com/library/view/c…

What are some other examples of this pattern? I'm curious whether it originated in React, or somewhere else.

https://twitter.com/dubroy/status/1442397392037416961 ∙ Archived on 2025-03-28.

← Twitter Archive: 2021