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

remove function style get()/set() #49

Closed
unional opened this issue Oct 27, 2018 · 0 comments · Fixed by #52
Closed

remove function style get()/set() #49

unional opened this issue Oct 27, 2018 · 0 comments · Fixed by #52
Labels

Comments

@unional
Copy link
Collaborator

unional commented Oct 27, 2018

Since this is a global store, the input is likely an object.

Using set() run the risk of creating multiple instances of the store thus not recommended.

// somewhere
const store = get('abc')

// somewhere else
set('abc', ( ...get('abc'), a: 'newvalue' })

// now `store` !== get('abc') thus the store diverge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant