Actions
An action is the starting point of the data flow in Flux. It's a simple JavaScript object that must contain a type property indicating what kind of action is being performed. Actions may also include additional data (called the "payload") necessary for updating the application state.
// Example of a Flux action
{
type: 'ADD_TODO',
text: 'Learn Flux architecture'
}
Think of actions as "event tickets" that describe something that happened in your application, such as a user clicking a button, a form submission, or data arriving from an API.