-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat(nuxt): add clear
function to async data
#26259
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
Conversation
|
Seems like a nice DX improvement to me π With regards to |
I certainly agree - this raises a question whether
|
I think both, clear and reset, might be confusing Maybe updating it for v4 could be nice? π€ |
They will be confusing, I'm sure. Created #26269 to discuss updating it for v4. |
β Live Preview ready!
|
π Linked issue
resolves #26195
β Type of change
π Description
Allows clearing Nuxt data from within the async data composable (hence removing a need for knowing and/or passing a key). Original issue describes resetting Nuxt data instead (by respecting the optional
default
prop rather than always settingdata.value
toundefined
). Thought this might be better to start with though; I'm open to any suggestions!Will update the docs knowing this is a desirable addition.
π Checklist