Skip to content

Issues with use-statechart api #20

@yenda

Description

@yenda

Currently use-statechart can only start the statechart colocated in the component where it is used, under the :statechart key.

The ui-routes namespace on the otherhand uses the statechart under the ro/statechart key.

I'd suggest using a consistant key for both, but I'm also wondering about the current use-statechart implementation, here are my suggestions:

  • it should not provide config and local-state because those feel like anti-patterns in the use of statecharts, instead if a user wants the statechart to have an effect on the UI it should be through the :actor/component that is automatically set, and the props can then be added to the component's query as commonly done with ui/props in fulcro
  • config and local-state may still be returned via a debug? option
  • statechart should be an option (which would eliminate the need to lookup :statechart option of the component and allow multiple different statecharts to be used)

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