Last active
February 11, 2020 13:22
-
-
Save srikanthkyatham/01c2d743c200ca3fcec1c651cfc55e50 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const transferMachine = Machine({ | |
id: "transfer", | |
initial: "inactive", | |
states: { | |
inactive: { | |
on: { | |
MEMBER: "member", | |
SINGLE_ACCOUNT: "single_account", | |
BEFORE_10th: "before_10th", | |
OWNER_ACCOUNTS: "owner_accounts" | |
} | |
}, | |
member: {}, | |
single_account: {}, | |
before_10th: {}, | |
owner_accounts: { | |
on: { SINGLE_ACCOUNT_SELECTED: "single_account_selected" } | |
}, | |
single_account_selected: { | |
on: { SECOND_ACCOUNT_SELECTED: "second_account_selected" } | |
}, | |
second_account_selected: { | |
on: { | |
TRANSFER_SUCESS: "transfer_success", | |
TRANSFER_ERROR: "transfer_error" | |
} | |
}, | |
transfer_success: {}, | |
transfer_error: {} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment