Dynamic Columns from Asynchronous Data #3405
Unanswered
david-j-park
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use case where the columns in my table vary depending on the data retrieved from a server-side callback. Normally I would place that data request inside a useEffect() hook and update my component's state when the data is received. That seems to work with react-table, but all the documents talk about memoizing columns to improve performance. I'm seeing slowish render times with only a few hundred rows, so I suspect I'm not doing things the best way.
Is there a "right" way to handle this using
useMemo
?My code looks like this:
Beta Was this translation helpful? Give feedback.
All reactions