[Content]: misleading section about when derived-signals are called
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- documentation
Research direction
Start with the derived-signals documentation page linked in the issue and compare the quoted explanation with the provided SolidJS reproduction. Update the wording so it accurately describes when the function runs, then verify the example and the resulting behavior in the documentation.
Written by the indexing model from the issue text.
Description
📚 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'));
- Dominant language
- MDX
- Stars
- 292
- Forks
- 361
- Avg merge
- 7h 51m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid-docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solidjs/solid-docs#1635 ·
-
good first issue solid solidstart
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
solidjs/solid-docs#1522 ·
-
pending review
solidjs/solid-docs#1637 · 1 assignee ·
-
help wanted
solidjs/solid-docs#1636 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
solidjs/solid-docs#1630 · 1 comment ·
All issues in solidjs/solid-docs
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EclipseFdn/open-vsx.org#13419 ·