We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ref shouldn't be used when reading or writing for a value used when rendering: https://react.dev/reference/react/useRef. And the output from this hook can clearly be used for rendering. The react doc actually explains how to do this, and it is a bit dirty: https://react.dev/reference/react/useState#storing-information-from-previous-renders.
Here's the issue that I opened, to which Dan Abramov answered and made me aware of this problem: facebook/react#25893
The text was updated successfully, but these errors were encountered:
Thank you for your suggestion. In future major versions, we will consider removing it and using a better solution.
Sorry, something went wrong.
It may be possible to store a pre through a closure to replace the use of Ref, but there will be a big change in use from the previous
No branches or pull requests
Ref shouldn't be used when reading or writing for a value used when rendering: https://react.dev/reference/react/useRef. And the output from this hook can clearly be used for rendering.
The react doc actually explains how to do this, and it is a bit dirty: https://react.dev/reference/react/useState#storing-information-from-previous-renders.
Here's the issue that I opened, to which Dan Abramov answered and made me aware of this problem: facebook/react#25893
The text was updated successfully, but these errors were encountered: