T
TanStack3y ago
harsh-harlequin

How to properly separate table files?

When you separate files naively, every table update causes any other component inside it to rerender. https://codesandbox.io/s/tanstack-table-file-separation-resize-mtm19c Here is an example where I've separated the header and rows to another component. I've tried some ways to memoize it but I could not get it to work properly, it would either stop the width updates or still continue to rerender. Is there a good example on how to properly pass those big objects as props, such as headerGroup or row?
Fursum
CodeSandbox
Tanstack-Table-File-Separation-Resize - CodeSandbox
Tanstack-Table-File-Separation-Resize by Fursum using @faker-js/faker, @tanstack/react-table, react, react-dom
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?