Created
February 17, 2021 15:46
-
-
Save edorivai/c505205234b402381880f454117132b5 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) | |
// | "invited_not_logged_in" | |
// | "active_first_15_days" | |
// | "active_users_after_15_days" | |
// | "removed_from_dashboard"; | |
const hubspotMachine = Machine({ | |
id: 'hubspot', | |
initial: 'invited_not_logged_in', | |
context: { | |
}, | |
states: { | |
invited_not_logged_in: { | |
on: { | |
LOGIN: 'active_first_15_days', | |
DELETE: 'removed_from_dashboard' | |
} | |
}, | |
active_first_15_days: { | |
on: { | |
PASSED_15_DAY_MARK: 'active_users_after_15_days', | |
DELETE: 'removed_from_dashboard' | |
} | |
}, | |
active_users_after_15_days: { | |
on: { | |
DELETE: 'removed_from_dashboard' | |
} | |
}, | |
removed_from_dashboard: { | |
on: { | |
ADD: 'invited_not_logged_in' | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment