Quilt·
Lesson 4 of 7

VIEW — observe without mutating

VIEW reads a value. That's it. It does NOT record an event. The journal is unchanged. This is the law of purity: a VIEW is a function from state to a value, and applying it twice gives the same answer.

01The shape

VIEW reads a value. That's it. It does NOT record an event. The journal is unchanged. This is the law of purity: a VIEW is a function from state to a value, and applying it twice gives the same answer.

02Try it

lesson-4.js
Journal · cells: 0

03The law: purity

VIEW is a function from state to value. Calling it twice gives the same answer. It does not modify the journal. This is what makes views cacheable, optimizable, and safe to retry. The substrate is happy to call VIEW as many times as you want — it costs nothing.

04What you can build

Anything that reads. A render function. A search query. A report. A dashboard. The substrate is the source of truth, VIEW is the question, and the answer is the value. No side effects, no journal pollution, no surprises.

05Next

We've seen the four spatial opcodes. Now time. Lesson 5: TICK →