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

onSave is called if onSave changes. Can this be optional? #17

Closed
mspangl5 opened this issue Aug 19, 2022 · 1 comment · Fixed by #21
Closed

onSave is called if onSave changes. Can this be optional? #17

mspangl5 opened this issue Aug 19, 2022 · 1 comment · Fixed by #21

Comments

@mspangl5
Copy link

My onSave callback needs to verify against a state value that changes often. But if I put that state value as a dependency to the useCallback, it will create a new callback each time that state value changes and then useAutosave will call onSave. I would like to silently update onSave without triggering useAutosave to call it.

@jollyjerr
Copy link
Owner

Hi! Sounds good - that behavior would probably make more sense as the default anyway. I'll update asap - but PR's are always welcome in the meantime!

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

Successfully merging a pull request may close this issue.

2 participants