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

Conversation

@Kelin2025
Copy link
Member

@Kelin2025 Kelin2025 commented Jul 7, 2023

See #25 tracking issue for details

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Kelin2025
Copy link
Member Author

Current issues

  • orderBy option in grabItems doesn't work as described in RFC: grabItems (naming wanted) #24 . Currently it has { key, type: 'asc' | 'desc' } shape, but would be better to have a more low-level comparator
  • createSwitch is broken, and I actually think we should remove it. createSelection with source option is enough for all the cases
  • Currently there's a lot of unnecessary re-calculations, due to problematic duality
    • If createSelection and other derived methods use combine under the hood, then there's no way to filter out unnecessary updates as it's just a pure mapping each tim
    • If they use createStore, we can do more granular updates (such as subscribing to $kv.addItem and mapping a single item instead of re-mapping a whole KV), but then we have the following problem:
      • If serialize: 'ignore' isn't passed to derived stores, then the same state will appear X times for each createSelection etc. calls
      • If serialize: 'ignore' is passed, then initial state after hydration won't be computed automatically. We'll need to use setup: appStarted pattern for each method which is cringe for such often used methods

- `setItemField(path, cb)` variation
- `addItems`
- `$kv.fill`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants