Open jbreckmckye opened 2 years ago
I already shared this on Twitter, but I thought I would raise an 'issue' to give it more visibility.
Robot3-Viz is a library for visualising Robot 3 finite state machines. You can use it with a plain JS API or with React.
For instance, given a state machine like
export const invokePromises = createMachine({ idle: state( transition('load', 'loading') ), loading: invoke(async () => Promise.resolve(true), transition('done', 'idle', reduce((ctx: any, ev: any) => ({ ...ctx, user: ev.data })) ), transition('error', 'error', reduce((ctx: any, ev: any) => ({ ...ctx, error: ev.error })) ), transition('abort', 'idle') ), error: state() })
The library outputs a visualisation like this
The library requires a DOM to render. If you want to use it as part of an automated process, it needs to be on a machine with either a screenbuffer or XVFB.
Documentation and more examples are in the README.
Whoa! Did you tag me? I must have missed it.
I already shared this on Twitter, but I thought I would raise an 'issue' to give it more visibility.
Robot3-Viz is a library for visualising Robot 3 finite state machines. You can use it with a plain JS API or with React.
For instance, given a state machine like
The library outputs a visualisation like this
The library requires a DOM to render. If you want to use it as part of an automated process, it needs to be on a machine with either a screenbuffer or XVFB.
Documentation and more examples are in the README.