React for Two Computers — overreacted
13 hours ago
- The article explores the conceptual differences between function calls (verbs/recipes) and tags (nouns/blueprints), showing how tags represent potential computations that are passive and open to interpretation.
- It introduces a framework for splitting computations across time and space, using 'Early' and 'Late' worlds to represent distributed computation across two computers, with tags serving as a bridge between them.
- Key concepts include 'Components' (capitalized functions that embed rather than introspect arguments) and 'Primitives' (lowercase functions that require eager evaluation), along with mechanisms like 'import tag' and 'import rpc' for crossing computer boundaries.
- The article demonstrates how to split a React-like program into Early and Late Components, with interpret() dissolving components outside-in and perform() handling primitives inside-out, enabling client-server architecture without traditional network calls.
- It concludes with advanced ideas like 'use client' and 'use server' directives, streaming execution, stateful Late worlds, and caching, showing the practical implications for React Server Components and modern web development.