Skip to content

Instantly share code, notes, and snippets.

@RoryKelly
Created September 5, 2019 15:03
Show Gist options
  • Save RoryKelly/4bc4b6b3daafdde6b37a51964310050a to your computer and use it in GitHub Desktop.
Save RoryKelly/4bc4b6b3daafdde6b37a51964310050a to your computer and use it in GitHub Desktop.
/**
* Current state of an object. for example the state of a view or the state of a hardware device.
*/
interface State
/**
* A result modifies state.
*/
interface Result
/**
* An [Event] creates one or more [Result]s when then are used to update [State].
* For example:
* - pressing a button create a button pressed event.
* - the Button Pressed Event would create a Update Label Result.
* - the Update Label Result would modify the LabelViewState.
*/
interface Event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment