Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[2.0] A memo whose first read rejected reads `undefined` (not NotReady) in a verdict pass while it is re-asked

Cerrado
#4,244 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Start with packages/signals/src/core/async.ts and core/verdict.d.ts, then trace how notifyStatus and verdictValue handle an initially rejected memo when it is re-asked. Reproduce with the issue's createSignal, createMemo, and isPending example; compare the observed [true, undefined] with the expected NotReadyError. Done when the re-ask and related latest or createDeferred reads no longer expose undefined before a value lands.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Version: solid-js / @solidjs/signals 2.0.0-rc.16, rc.17 and rc.18 (not rc.15).

The isPending contract (signals core/verdict.d.ts): "A read that has no value yet is loading, not pending — the probe reports only updates to a value that already exists."

Repro (no boundaries needed):

const [n, setN] = createSignal(0)
const m = createMemo(() => {
  const i = n()
  return i === 0 ? Promise.reject(new Error('boom')) : new Promise(r => setTimeout(() => r({ key: 'a' }), 50))
})
createRenderEffect(
  () => { try { return [isPending(() => m()), m()] } catch (e) { return [e] } },
  v => console.log(v)
)
// after the rejection: StatusError, as expected
setN(1) // re-ask
// observed until the landing: [true, undefined]   -- expected: NotReadyError (no value has ever landed)

Cause (dev build): notifyStatus(STATUS_ERROR) clears STATUS_UNINITIALIZED (packages/signals/src/core/async.ts), so after the re-ask verdictValue treats the node as initialized and pending and returns el._value (undefined). latest(() => m()) and createDeferred read the same.

Effect in an app: a list whose first read failed; its Retry re-asks it; a <Show when={isPending(() => page()) && …}> in the region (or any pass that probes isPending and then reads the page) dereferences undefined and throws a TypeError into the error boundary, so the retried rows never paint.

Lenguaje dominante
TypeScript
Estrellas
36.2k
Forks
1.1k
Merge medio
11 h
PR fusionados (30 d)
343

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de solidjs/solid

Todos los issues de solidjs/solid

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.