Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 413 Bytes

README.md

File metadata and controls

10 lines (6 loc) · 413 Bytes

State

Using this pattern lets you separate functionalities depending on the current state of the object. Each State will be separate object that has a method and each method will act according to its state.

It is single responsibility since objects we're separated according to its state

Open/Closed Principle since you can add more state without breaking existing code.

You will be saved from conditionals