Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Content]: misleading section about when derived-signals are called

未關閉
#692 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
45/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
javascript
領域
documentation

研究方向

從 issue 中連結的 derived-signals 文件頁面開始,將其中引用的說明與提供的 SolidJS 重現進行比較。更新措辭,使其準確描述函式何時執行,然後驗證文件中的範例及其產生的行為。

由索引模型根據 Issue 內容生成。

描述

solid
📚 Subject area/topic

concepts/derived-values/derived-signals

📋 Page(s) affected (or suggested, for new content)

https://docs.solidjs.com/concepts/derived-values/derived-signals

📋 Description of content that is out-of-date or incorrect

These functions are not executed immediately, but instead are only called when the values they rely on are changed. When the underlying signal is changed, the function will be called again to produce a new value.

I'm beginning with solidjs, so maybe I got this wrong, but I think this is at least misleading.

It is not called when count() changed (click "call inc").
It is only called, if it is explicitly called (in the example click "call double") or if it is used in a reactive context (uncomment {/*<div>double: {double()}</div>*/})

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
import { render } from "solid-js/web";
import { createSignal } from "solid-js";

function App() {
    const [count, setCount] = createSignal(0);

    const inc = () => setCount(count() + 1)
    const double = () => {console.log("double called"); return count() * 2}

    return (
        <div>
            <div>count: {count()}</div>
            {/*<div>double: {double()}</div>*/}
            <button onClick={() => inc()}>call inc</button>
            <button onClick={() => double()}>call double</button>
        </div>
    );
}

render(() => <App />, document.getElementById('app'));
主要語言
MDX
星號
292
分支
361
平均合併
7 小時 51 分鐘
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

solidjs/solid-docs 的其他 Issue

查看 solidjs/solid-docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。