Open bloodchen opened 4 years ago
There's currently no nice way to do this. You'll have to do something like:
store.set('items', [...store.get('items'), newItem]);
I plan to add a convenience method for this. See: https://github.com/sindresorhus/electron-store/issues/52
@sindresorhus Doesn't this cause performance issues when the array is big?
Only for huge arrays, and you should not store huge chunks of data in conf
anyway.
For anyone wanting to work on this, see the initial attempt and feedback in: https://github.com/sindresorhus/conf/pull/124
Let's say I have a config
How can I add an item to items array?
Thanks