Is it possible to implement a Flatlist with react native web where you prepend data while maintaining the visible content?
Right now, it jumps to the top of the Flatlist when you prepend something. I am using onContentSizeChange
to force move the scroll position after an update, but the experience is terrible as there is sometimes a huge delay before the update.
Check this slack to see what I mean: https://snack.expo.io/@divone/prepend-data-to-flatlist-on-web
Was anyone successful in implementing a Chat-like Flatlist with React Native Web? If yes, how to achieve it?
EDIT: I discovered that on react native web, content visibility is automatically maintained when you prepend data IF AND ONLY IF the scroll bar is not at the top of the screen. (snack)
So my question still stands... how to prepend data and maintain visiblity even if the scrollbar is scrolled all the way up?