Re:A proposal to add signals to JavaScript
by mg on Monday April 01, 2024 @11:30AM
(#39895195)
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.
[ Parent
| on HN ]
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.