Skip to content

How to memoize rows correctly with @tanstack/react-table #535

Answered by obinmatt
jonahallibone asked this question in Q&A
Discussion options

You must be logged in to vote

@jonahallibone you want your getItemKey to be React.useCallback((index: number) => rows[index]?.id ?? index, [rows])

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@piecyk
Comment options

piecyk Sep 26, 2023
Collaborator

@jonahallibone
Comment options

@obinmatt
Comment options

@obinmatt
Comment options

Answer selected by jonahallibone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants