Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
mg
2y ago
0 comments
Save
Share
If the component only wants to rerender when the counter changes from odd to even or even to odd, it can cache the value and do as it pleases.
0 comments
1 comments · 1 top-level
top
newest
oldest
troupo
2y ago
But then you have to make sure that the element caches that value. With signals you don't have to do that. Your component (or parts of it) will never be re-rendered if it never uses the signal.
j
/
k
navigate · click thread line to collapse