Skip to content

JSON-serialisable action definitions #2

@mattpocock

Description

@mattpocock

Summary

on: {
  EVENT: {
    actions: [
      assign([
        {
          from: 'event.value',
          to: 'context.value',
        }
      ])
    ]
  }
}

Syntax TBD.

What problem does this solve? It means that assign actions can be constructed as part of the visual builder. This feels really interesting because it allows for visualisation of assignations, stronger analytics and better type definitions. I.e. you could construct typestates out of this information, and also infer some basic information about event type signatures.
I feel like we may need to stray into this territory if we're going to turn XState into a fully deployable, no-code solution.

Link to original discord post:

https://discord.com/channels/795785288994652170/840540661442150470/848561574339411968

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions