open-consul/ui/packages/consul-ui/app/machines/validate.xstate.js

30 lines
384 B
JavaScript

export default {
id: 'form',
initial: 'idle',
on: {
RESET: [
{
target: 'idle',
},
],
},
states: {
idle: {
on: {
SUCCESS: [
{
target: 'success',
},
],
ERROR: [
{
target: 'error',
},
],
},
},
success: {},
error: {},
},
};