Hook actions occur each time a user initiates some action within the Flock UI that results in a command getting dispatched. Hook actions are the life blood of an app on the Flock system, so to speak, since they act as the glue that binds user (or hook) actions with the backend app code, and within the Flock client itself. Understanding the nature of these actions, including the types of actions and what they result in, is important for the app developer on the Flock platform.
There are fundamentally three different types of hook actions based on the type of command that they result in.
- Widget Commands. Commands that result in the Flock UI itself opening a widget. A good example of this would be the TODO app.
- Browser Commands. Commands that result in the local system browser getting invoked with a URL. An example of this is the video app.
- App Commands. Commands that result in a call to the backend of the app.
Figure 1.1: A command opening a widget