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

Fetch keys from other namespace #2

Open
prakashchokalingam opened this issue Jan 8, 2022 · 0 comments
Open

Fetch keys from other namespace #2

prakashchokalingam opened this issue Jan 8, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request new feature

Comments

@prakashchokalingam
Copy link
Member

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: '#' })
@prakashchokalingam prakashchokalingam added enhancement New feature or request new feature labels Jan 8, 2022
@prakashchokalingam prakashchokalingam self-assigned this Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
None yet
Development

No branches or pull requests

1 participant