<commit_before># API: Actions

Actions in Fluxible are stateless functions that receive three parameters:

 * [`actionContext`](#action-context) - Provides access to Flux methods
 * `payload` - The action payload
 * `done` - A function to be called when the action has been completed

If the action does not return a promise and takes three parameters, executeAction will wait for the done callback:

```js
export default function myAction(actionContext, payload, done) {
    setTimeout(function () { // simulate async
        actionContext.dispatch('MY_ACTION', payload);
        done();<commit_msg>Add reference to action creators<commit_after># API: Actions

Actions (called to "action creators" in Flux) in Fluxible are stateless functions that receive three parameters:

 * [`actionContext`](#action-context) - Provides access to Flux methods
 * `payload` - The action payload
 * `done` - A function to be called when the action has been completed

If the action does not return a promise and takes three parameters, executeAction will wait for the done callback:

```js
export default function myAction(actionContext, payload, done) {
    setTimeout(function () { // simulate async
        actionContext.dispatch('MY_ACTION', payload);
        done();
{'fraction_non_alphanumeric': 0.08273667462211615, 'fraction_numerical': 0.0, 'mean_word_length': 4.445887445887446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3055486', 'n_tokens_mistral': 314, 'n_tokens_neox': 303, 'n_words': 143}