Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-serialisable action definitions #2

Open
mattpocock opened this issue May 30, 2021 · 0 comments
Open

JSON-serialisable action definitions #2

mattpocock opened this issue May 30, 2021 · 0 comments

Comments

@mattpocock
Copy link

mattpocock commented May 30, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant