Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

05 — Reaction

Demonstrates reaction — a more fine-grained alternative to autorun.

Concepts

  • reaction(dataFn, effectFn) — separates "what to track" (data function) from "what to do" (effect function)
  • Selective tracking — only fires when the data function's return value changes
  • Disposalreaction returns a disposer function to stop tracking

Run locally

npm install
npm run dev

Open in CodeSandbox

Open in CodeSandbox