4 ms·
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.
by mg 3y ago
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.
- troupo 3y agoBut 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.