Makes a feed screen swipeable: one item in front (current), and a swipe
(swipeToNext) that brings the next one, loading the next portion itself
when the loaded items ran out. It takes a feed screen definition only — a
plain screen is a type error — and returns one, so it composes with
.pipe: defineFeedScreen({ … }).pipe(swipeableFeed({ onSwipe })).
A swipe is a transition, like a scroll. Its item move, the app's onSwipe
and the two items' visits are one step: the item in front leaves, the app
sends what it sends on a swipe, the next item's enter runs — and only then
does the frame move, so a failure leaves the item in front where it was. A
trail keeps the item in front, and a retrace swipes to it again, sending what
each swipe sends; a checkpoint keeps it too. A swipeable feed whose first
answer holds no item has nothing in front; the first item that loads comes
in front on the next swipe.
Makes a feed screen swipeable: one item in front (
current), and a swipe (swipeToNext) that brings the next one, loading the next portion itself when the loaded items ran out. It takes a feed screen definition only — a plain screen is a type error — and returns one, so it composes with.pipe:defineFeedScreen({ … }).pipe(swipeableFeed({ onSwipe })).A swipe is a transition, like a scroll. Its item move, the app's
onSwipeand the two items' visits are one step: the item in front leaves, the app sends what it sends on a swipe, the next item'senterruns — and only then does the frame move, so a failure leaves the item in front where it was. A trail keeps the item in front, and a retrace swipes to it again, sending what each swipe sends; a checkpoint keeps it too. A swipeable feed whose first answer holds no item has nothing in front; the first item that loads comes in front on the next swipe.