Skip to content
Discussion options

You must be logged in to vote

Good questions — and validating them shook out a real engine bug (#3089, fixed on next) that was making mid-action reads through derived stores look torn, so thanks for pushing on this.

The composition that survives the optimistic upgrade: don't mirror the collection at all. Render membership from the user's store directly, and keep your ephemera in a library-owned store keyed by row id, joined at read time:

// library-owned, keyed sidecar — no membership mirror, no syncing
const [lib, setLib] = createStore({} as Record<Id, { selected?: boolean; dragX?: number }>);

// render path: the user's store drives membership AND fields,
// ephemera joined per row by key
<For each={props.nodes}>
  {(

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by thedanchez
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants