[Content]: misleading section about when derived-signals are called
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 45/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript
研究方向
從 issue 中連結的 derived-signals 文件頁面開始,將其中引用的說明與提供的 SolidJS 重現進行比較。更新措辭,使其準確描述函式何時執行,然後驗證文件中的範例及其產生的行為。
由索引模型根據 Issue 內容生成。
描述
📚 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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
solidjs/solid-docs 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
solidjs/solid-docs#1635 ·
-
good first issue solid solidstart
難度 2/5 1-3 小時 新手友好度 62/100
solidjs/solid-docs#1522 ·
-
pending review
solidjs/solid-docs#1637 · 已指派 1 人 ·
-
help wanted
solidjs/solid-docs#1636 · 5 則留言 ·
-
難度 3/5 1-2 天 新手友好度 52/100
solidjs/solid-docs#1630 · 1 則留言 ·
查看 solidjs/solid-docs 的全部 Issue
相似的 Issue
-
Crush 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
automated issue report
難度 1/5 1 小時以內 新手友好度 95/100
-
難度 1/5 1 小時以內 新手友好度 90/100
VoltAgent/awesome-design-md#469 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
KhronosGroup/glTF#2648 ·
-
難度 1/5 1 小時以內 新手友好度 90/100
sccn/sccn.github.io#108 ·