Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[2.0 / next] A direct write does not clear a writable memo's previous error

未关闭
#4,110 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
frontend

调研方向

Start in packages/signals/src/signals.ts, where the createSignal documentation near line 368 says a direct write should replace the stored error without rerunning the derivation. Read the failed-writable-memo cases and candidate changes in #3886 and the held-error rule in #4085 before touching the write path. Done means a reduced source regression where a write after a throwing initial derivation makes accessor reads, createEffect and the error boundary show the written value.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

A writable memo throws during its initial derivation, and <Errored> shows the error. A button outside the boundary calls its setter with 2, but the boundary continues showing the original error instead of rendering the written value.

Your Example Website or App

https://s.olid.uk/id/PmShIVyvSYWMQLTS5qkkSA

Steps to Reproduce the Bug or Issue
  1. Open the playground. The boundary shows Error: boom.
  2. Click Set value to 2.
  3. The boundary continues showing Error: boom instead of Value: 2.
Expected behavior

The direct write should replace the memo's failed outcome with 2, allowing the boundary to recover and render Value: 2 without rerunning the derivation.

Screenshots or Videos

No response

Platform
  • OS: Linux
  • Browser: Chromium 154.0.8037.57
  • Solid: playground pinned to next@d5e32a9af41c7bfe0bc090f7438ee4297d540b17. A reduced source regression also fails on current next@ccd99481deed3ebb567ee11ab7a152ced84d122b.
Additional context

The createSignal documentation says a direct write lands without rerunning the derivation.

The failure also affects ordinary accessor reads and createEffect, which retain the old error after a write. This playground makes it visible through an error boundary.

The failed-writable-memo cases from #3886 are explicitly outside #4085's held-error rule. #3886 contains related regression tests and candidate changes.

主要语言
TypeScript
星标
36.1k
派生
1.1k
平均合并
11 小时 32 分钟
30 天内合并 PR
356

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid 的其他 Issue

查看 solidjs/solid 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。