You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If multiple instances of useStorage point to the same key, when deleting the key/value, only the instance used for the deletion is updated, the other instances keep the previous value.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
By setting it back to null it's being deleted therefore not updated. If you really need to have 2 different variables for the same element maybe consider switching it to empty string or make it async with nextTick to reset it after
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
If multiple instances of
useStorage
point to the samekey
, when deleting the key/value, only the instance used for the deletion is updated, the other instances keep the previous value.Reproduction
https://play.vueuse.org/#N4IgDghgxg1hDmBTAziAXAbVAOwgW0XRADcBXRAWgBNE8BLEAGhGQHtSAnKQtEU7MDHhMQNZFA50wAFzqtsRAGrkABABFadFQAoAFhAA2AMxV1sKgGIdE2KLoCUp5CogqaxRAdZgz8FaVkDOmkATxcDLwB3ZxD2FWlWFUjJaUQVAFVsOg8OZEMVZTSAGToAIw4ISRQVI1YOAtUAJhUAMhUAZhFOAyJdaWkwZDQAemH+QXgAOihWPGGyShp6YaDS4bMaAA9JvAArVABfRhx8HhAAAQXSZERh5H1rKhE2Tm4icaERMQkpWXkiADKD0QVAaiHSN38gWCdBQky6HB6vD6AyGow+Uxmc0u5Gut3ulRB5wAjAAGSbEyak9bYLY7fYgI4nAhEHGIPHDGbWZ7sLhnDFfFA-GRyBS8ADCrAiiCgf3MrBMKBu2Fk+UKKkleDArGQMPkGWhshQCKRIBRgxGYwEQmms2GbI5XMQJPJlOpG0Q2z2hwAuswjHQDMa0KAAIJgMCTBboUCpLUGCCpIgAHio2QAfAADWqsTMqYiGchoFTAYA1ViJA4HZPDNPEdMAHWwqYzmdKlTzBYMRZLZfb9RUVZrdcbzdKAQS5nOUCCsAAvA2+GAqInEIuVMhQkGFyBSnUaBw0MSwJsN1K6KDSgnYABuFSQKhp7DwNAAVhPi-T4tnMHiiVIy6rvmhYoDW479PIo7JuBk4qNOP47tYeCsB466biE26LnuHAHkeJ5nkEoKPHeD5Pi+76bJ+350LAf4qEhKFpJudQIGkXbkGBE6Qc8wrSEQdBanU0glv4NwAgkFRIIONQcLMKgAOQOjcnJ1Ig8lNk2MzYJu5aJHOomIOJLFINo8kwIgITyYwKjYKQET2Jp8g6f2Kj6XiRmSYgpnmZZ1m2fZGnYEY-CyqK-iAak2iOMATYqCo-ZRiBrkKQkCTqdgByBcFthyvRtCMVFJaxfFlSJd2aT6f5BhNgcjJVkAA
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: