In this video we'll load data using XState and the help of a finite state machine. We'll keep track of needing to load more data, or if we've already fetched all that is available.
Code available at: https://github.com/leighhalliday/demo-infinite-scroll/blob/master/src/WithStateMachine.js
Artwork by James Gilleard - https://www.artstation.com/jamesgilleard