Skip to content

Instantly share code, notes, and snippets.

@edorivai
Created February 17, 2021 15:46
Show Gist options
  • Save edorivai/c505205234b402381880f454117132b5 to your computer and use it in GitHub Desktop.
Save edorivai/c505205234b402381880f454117132b5 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// 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