Skip to content

Fetch keys from other namespace #2

Description

@prakashchokalingam

Currently, we have a global config of namespace & delimiter. Once configured the local storage hooks can read keys of a given namespace only.

Yet there might be use cases especially in micro frontends where we might need to fetch keys from a different namespace. Hence proposing the solution of overriding the default config by providing the config as args to the hook.

const [user] = useLocalStorage('user', { namespace: 'global', delimiter: '#' })

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions