Skip to content

2.0.0-beta.14: createOptimisticStore bug #2752

@brenelz

Description

@brenelz
// Minimal repro of the beta.14 reconcile crash.
//
// Trigger requires all three together:
//   1. createOptimisticStore with an async derivation that RETURNS its value
//   2. the returned object has a NESTED array (top-level array stores are safe)
//   3. the array is only read through <For> (so it has no STORE_NODE yet
//      when the commit's reconcile recurses into it)
//
// On published beta.14 the commit throws inside reconcile
// (`Cannot read properties of undefined (reading '0')` at applyStateFast)
// and <Loading> hangs on its fallback forever. Mutating the draft instead —
// `s => fetchItems().then(items => { s.items = items })` — commits fine.

https://stackblitz.com/edit/solidjs-templates-7syqqvpd?file=src%2FApp.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions