Created
December 31, 2020 17:55
-
-
Save mfbx9da4/dff0861838657ff2ad4a2c4300ad6b85 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
Machine({ | |
id: 'Scroll view', | |
initial: 'chat_closed', | |
context: { | |
dog: null | |
}, | |
states: { | |
chat_closed: { | |
on: { | |
open: 'chat_open' | |
} | |
}, | |
chat_open: { | |
on: { | |
render_messages: 'now' | |
} | |
}, | |
now: { | |
on: { | |
scroll_up: 'scrolling' | |
} | |
}, | |
scrolling: { | |
on: { | |
inside_load_more_threshold: 'load_more_inside', | |
load_more_at_0: 'load_more_at_0' | |
} | |
}, | |
load_more_inside: { | |
scrollTop: 100, | |
height: 800, | |
scrollHeight: 800, | |
on: { | |
render_messages: 'scrolling' | |
} | |
}, | |
load_more_at_0: { | |
scrollTop: 0, | |
height: 800, | |
scrollHeight: 800, | |
on: { | |
render_messages: 'keep_scroll_in_place' | |
} | |
}, | |
keep_scroll_in_place: {} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment