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

feat: Add setValue with function setter for useMMKVObject #623

Merged

Conversation

fahad86
Copy link
Contributor

@fahad86 fahad86 commented Jan 18, 2024

No description provided.

Copy link
Owner

@mrousavy mrousavy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Left some styling comments

src/hooks.ts Outdated Show resolved Hide resolved
src/hooks.ts Show resolved Hide resolved
src/hooks.ts Outdated Show resolved Hide resolved
src/hooks.ts Outdated Show resolved Hide resolved
fahad86 and others added 4 commits January 18, 2024 18:25
Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
@mrousavy mrousavy changed the title etValue prevValue support for useMMKVObject hooks feat: Add setValue with function setter for useMMKVObject Jan 18, 2024
src/hooks.ts Outdated Show resolved Hide resolved
@mrousavy mrousavy self-requested a review January 18, 2024 14:49
src/hooks.ts Outdated Show resolved Hide resolved
mrousavy and others added 2 commits January 18, 2024 15:52
Other objects might not be callable
@mrousavy
Copy link
Owner

Actually you are right, we need to use instanceof Function because it might be a non-callable function object as well.

@mrousavy mrousavy merged commit 5dab096 into mrousavy:master Jan 18, 2024
3 of 4 checks passed
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 this pull request may close these issues.

None yet

2 participants