Skip to content

Custom actions #128

@owickstrom

Description

@owickstrom

It should be possible to supply custom actions. Those would be of a new type in the action union and carry a name and a toStringified JavaScript function. Simple, but action functions would have to be pure (not closing over spec definitions).

Or, if we want to do this the fancier way, we'd register the custom function by name in the runtime, and only carry the name in the Action type. When performed, the action would be looked up in the runtime and called. This way, custom actions can close over state. The register would have to be recomputed on every state when generating actions.

Not sure about all implications, just a starting point to think about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions