Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

RFC: $kv.addItems #21

Open
Kelin2025 opened this issue Jul 7, 2023 · 0 comments
Open

RFC: $kv.addItems #21

Kelin2025 opened this issue Jul 7, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kelin2025
Copy link
Member

Case

Currently, if you want to add more items to KV, you have to call addItem X times or use addItemTree which isn't always the case 'cause you don't always have a tree-like structure

Due to the nature of sample, calling addItem X times happens in separate ticks which triggers X updates with halfway updated state

Solution

Like $kv.addItem, add $kv.addItems too

const addItems = $kv.addItems({ fn: (draft) => item })
@Kelin2025 Kelin2025 added the enhancement New feature or request label Jul 7, 2023
@Kelin2025 Kelin2025 self-assigned this Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant