// 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
https://stackblitz.com/edit/solidjs-templates-7syqqvpd?file=src%2FApp.tsx