-
I'm using Redux, and for table I'm compute derived data using reselect, after this assign it from props to state.
In the 2nd column I have input, so on each onChange I should recalculate data for just one row, I'm doing it this way
And here I'm generating new table's body
But the problem is what after updating only single row I have the whole table re-rendering and it's pretty slow, how can avoid it? So just single row must be re-rendered |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Did you check this section in FAQ? https://github.com/tannerlinsley/react-table/blob/master/docs/faq.md#how-do-i-stop-my-table-state-from-automatically-resetting-when-my-data-changes |
Beta Was this translation helpful? Give feedback.
-
Generally, I would say only But the main problem I think is that there are a lot of useless posts/comments/articles about that React is fast and you don't have to optimise anything in your components, as we can see reference to Kent C. Dodds article in the link above. If I'm saying it's slow, it mens it's slow and don't say that it's fast. It would be cool if you update docs, covering this topic, because I pretty often see discussions on this problem |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue, I have cell input and whenever I am updating a single cell it re-renders the whole table |
Beta Was this translation helpful? Give feedback.
-
I have the same problem on v8... |
Beta Was this translation helpful? Give feedback.
Generally, I would say only
React.memo
with customequalityCheck
function works, nothing else. I found solution here – #1496But the main problem I think is that there are a lot of useless posts/comments/articles about that React is fast and you don't have to optimise anything in your components, as we can see reference to Kent C. Dodds article in the link above. If I'm saying it's slow, it mens it's slow and don't say that it's fast.
Why my table with 2k cells must be re-rendered if only single row is changed? I should go and optimise render function/component? Hell no, react must re-render only single row/cells what really updated, not everything, it's React job.
With re-rendering whole…