Skip to content
New issue

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

[Suggestion]: Make better use of ref in the last challenge of the docs #7236

Open
Spoof14 opened this issue Oct 20, 2024 · 1 comment
Open

Comments

@Spoof14
Copy link

Spoof14 commented Oct 20, 2024

Summary

Remove useless useState and simply use ref

Page

No response

Details

The docs in the 4th challenge suggest using both a useState and a ref for managing the value of a component when there is a delay. This is unnecesarry and we can simply use the ref.
https://react.dev/learn/referencing-values-with-refs#challenges

@Spoof14
Copy link
Author

Spoof14 commented Oct 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant