Summary
In this chapter, we saw how behavioral design patterns enable the extension of functionality by supporting different implementations and decoupling parts of the code base.
The observer pattern is useful to support communication with loosely coupled observable/observer pairs. The state and strategy patterns can be used to implement state machines and swap implementations effectively. The visitor pattern is a great way to expose an extension mechanism that’s decoupled from the structure of the objects it’s operating on.
Now that we know how to organize communication between different objects and classes with behavioral design patterns, in the next chapter, we’ll cover reactive view library patterns in React.