Skip to main content

Command Palette

Search for a command to run...

Reactive Change Detection

Published
β€’1 min readβ€’View as Markdown
Reactive Change Detection

How can runtime know about changes? πŸ”Ž Polling: Periodic reconciliation πŸŽ‡ Events: Occurrence of an event 🀝 Links: List of subscribers πŸ”Ž Polling States store only values and that’s it. Runtime periodically checks the current value with the previous one. And if they differ, it triggers reactions. // sometimes if( state !== state_prev ) reactions() This is how Angular, Svelte, and React work, for example. The problem with this approach is that for every sneeze, a lot of work is done, only to find out that almost nothing has changed. It may seem to you that ordinary comparison is a

Read Full Article

More from this blog

S

Solving Matters | AI News Aggregator

2206 posts

Stay updated with the latest trends and news in the world of AI.