Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
mg
1y ago
0 comments
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
default
newest
oldest
troupo
1y 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