r/reactjs • u/Few_Chair152 • Sep 29 '25
Needs Help Tanstack table with db level operations
So I am new to Tanstack table and Next.js, I am building a application that can handle adding columns, rows dynamically, editing cell values,.... with Tanstack table. I have read some docs and it seems like Tanstack table have sort, filter, search in client side, if I want those operations to happen at db level but still need ui not to load too slow, any ideas to help me with that ?
1
Upvotes
View all comments
Show parent comment
1
u/Few_Chair152 Sep 29 '25
Hi thanks for your answer, I also want to ask, when I add new rows, new columns, edit cell values, the ui looks really slow bc I made api call to my nextjs served to update the values in the db, is there anyway to fix this. I have tried optimistic updates where I update the UI instantly and save changes in the background but there is a flickering effect and cause some error when I edit the cells too quick or spamming changes. For example, when I finish edit cell A, I move to cell B, I start typing in cell B and after that it rolls backs to the initial value of cell B, possibly because I have updated cell A and updated cached values for the table. I am stuck on this, also adding new rows and cols is kinda slow then, do you know what steps can I take to fix this ? Thanks