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

[improvement] In useSaveData hook, instead of useState, useRef can be used #4

Closed
itaditya opened this issue Nov 12, 2019 · 2 comments
Closed

Comments

@itaditya
Copy link

useRef is much more suitable than useState when you just want some value to persist across renders. I can make a PR for that change.

@itaditya
Copy link
Author

Saw PR #1 I guess that would be even better.

@addyosmani
Copy link
Collaborator

Thanks for the suggestion, @itaditya. We've just landed #1 and hopefully that's a sufficient solution.

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

No branches or pull requests

2 participants