I am fairly new to React and development in general and I’ve stumbled across this problem for the first time and I can’t seem to find a fix for it.
It is a basic kanban or todo type app and I am using Firebase to manage the authentication and Firestore to store each user board and task.
Here’s what I’m currently struggling with: https://streamable.com/ndh9pv
Whenever I drag the task across boards or reorder them on the same board, I have that glitch happening for a quick second.
I am guessing this happens because the Firestore doesn’t get fetched/updated quick enough to make the transition seamlessly?
Each task and board have a unique ID.
I am storing the tasks for each board in an items array.
I listen to/fetch the documents using onSnapshot() for live updates and each time you drag a task around, it fires a function which calls the updateDoc(), passing the newly reordered array of tasks/boards to Firestore.
I have tried it with a mock data file (just a data.json) and it works seamlessly, there are no glitches whatsoever.