Skip to content

[FEAT] support watch meta change in storage #1988

Description

@mengxi-ream

Feature Request

Now we only support to watch the value of the local storage. But can't watch the change of the metadata of local storage variable.

What are the alternatives?

Now we have to add $ at the end of the KEY local:someKey$ to watch its metadata. But in the future, the underline implementation of the meta may change, and may should not add $.

This is the work around of my code

  // Add $ to the key to get the meta key for LAST_SYNCED_CONFIG_STORAGE_KEY
  const metaKey = `local:${LAST_SYNCED_CONFIG_STORAGE_KEY}$`

  const unwatch = storage.watch<LastSyncedConfigMeta>(metaKey, (_, newMeta) => {
    const meta = newMeta
    setAtom(meta?.lastSyncedAt ?? null)
  })

Additional context

Add any other context or screenshots about the feature request here.

Activity

  1. changed the title [-]support watch meta change in storage[/-] [+][FEAT] support watch meta change in storage[/+] on Dec 8, 2025
  2. aklinker1 commented on Apr 13, 2026

    @aklinker1
    Member

    Sure, I'm down to add a watchMeta function to storage and storage items

  3. added
    good first issue
    on Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomegood first issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions