Why useState
instead of useRef
?
#5995
Unanswered
steeeee0223
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It follows react's lint rules better. The other option is to mutate the ref during first render. This also somewhat guarantees that the table object is read only. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Are there any specific reasons that it uses
useState
for creating aref
-like object instead of usinguseRef
?react-table/src/index.ts
Beta Was this translation helpful? Give feedback.
All reactions