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

0.2 #26

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

0.2 #26

wants to merge 8 commits into from

Conversation

Kelin2025
Copy link
Member

@Kelin2025 Kelin2025 commented Jul 7, 2023

See #25 tracking issue for details

@stackblitz
Copy link

stackblitz bot commented Jul 7, 2023

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.

1 participant