Why Async Computed Values Fundamentally Change Reactive Systems
Solid 2.0 introduces support for async functions inside createMemo, allowing reactive computations to handle asynchronous operations like data fetching. While the API change appears minor, it forces the reactive runtime to manage not just cached values but entire execution lifecycles. Unlike synchronous computations that start and finish within the same call stack, async computations span time and can overlap, creating challenges around dependency tracking and stale results. When a dependency changes mid-fetch, multiple executions can exist simultaneously, raising the question of which result should be considered valid. This requires the runtime to implement policies for scheduling, cancellation, and race condition handling that synchronous reactivity never needed.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in