AI summary by TwinMind

If this ships, it will change javascript forever

Theo - t3․gg

25m 53s

Proposal Overview

  • TC39 proposal for native JavaScript signals in stage 0 (earliest stage)
  • Written by Eisenberg Effect, seeking stage 1 consideration by Daniel Ehrenberg (Bloomberg) and Jan from Google
  • Spec-compliant polyfill available for immediate use (with disclaimer not for production)
  • Push-then-pull algorithm with acyclic graph data structure

Contributors & Industry Support

  • Daniel Ehrenberg: Major tc39 contributor at Bloomberg
  • Dominic Gannaway: Former React core team, now at Vercel working on Svelte
  • Michael Weststrate: Creator of MobX, introduced patterns now widely adopted
  • Ben Lesh: Creator of RxJS, standardized signals concept in JavaScript
  • Patrick JS: Notable developer ("accidentally killed npm")
  • Frameworks providing input: Angular, Bubble, Ember, Fast, MobX, Preact, Qwik, RxJS, Solid, Starbeam, Svelte, Vue, Whiz

Signal Fundamentals

  • Data type enabling one-way data flow modeling cells of state and computations
  • Forms acyclic graph where nodes derive state from sources and contribute to sinks
  • Nodes tracked as clean or dirty for efficient updates
  • Counter example: const counter = new Signal.State(0), access via counter.get(), update via counter.set(1)
  • Computed signals: const isEven = new Signal.computed(() => counter.get() % 2 === 0)

Push-Then-Pull Algorithm Advantages

  • Automatic memoization: No recomputation if source values unchanged
  • Lazy evaluation: Unneeded values not recomputed even when sources change
  • False update avoidance: Counter changing 2→4 won't trigger parity recomputation since isEven result identical
  • Dirty flag propagation: Changes push dirty flags through graph, computation delayed until value explicitly pulled

API Design Philosophy

  • Two user categories: Application developers vs Library/Framework developers
  • Signal.State and Signal.computed for app devs in main namespace
  • Signal.subtle namespace for framework authors (advanced/dangerous APIs)
    • Signal.subtle.Watcher
    • Signal.subtle.untrack
    • Introspection APIs
  • Effect API deliberately excluded - too framework-dependent for standardization

Browser Implementation Benefits

  • Native browser optimizations possible vs polyfills
  • Memory assignment optimizations
  • Performance improvements through native runtime integration
  • Smaller bundle sizes (no JS shipping needed)
  • Framework interoperability: React, Svelte, Solid components sharing same state model

Library Integration Approach

  • First step: Replace library-specific signal implementations with Signal.State/Signal.computed
  • Custom effect implementations using Signal.subtle primitives
  • Microtask queue batching example provided
  • Signal.subtle.untrack for preventing unwanted graph connections during framework rendering

Use Cases & Examples

  • Counter class implementation with signals
  • Decorator pattern: @signal accessor decorator
  • Array rendering optimization using untrack to prevent false dependencies
  • Solid.js integration example (modified for proposed standard)

Current Status & Next Steps

  • Stage 0: Not yet under formal tc39 consideration
  • Seeking stage 1 in coming weeks
  • Slow, prototype-driven approach
  • Community involvement encouraged through GitHub
  • Testing, reporting other implementations, examples needed

TwinMind

Get summaries like this for your own meetings

TwinMind takes notes in the background during meetings, lectures, and calls, then writes the summary for you.

Free plan to get started

No bot joins your calls

Phone, desktop & Chrome apps

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome