mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-24 07:48:14 +00:00
More docs tweaks
This commit is contained in:
parent
4b05fdfa0f
commit
b5558d9eb7
@ -104,14 +104,12 @@ Sincerely, The Self-appointed President of the Cursor Skeptic's Society.
|
|||||||
|
|
||||||
`Events` are central to re-frame's architecture. Nothing happens without a dispatched event.
|
`Events` are central to re-frame's architecture. Nothing happens without a dispatched event.
|
||||||
|
|
||||||
Every app will have a different set of `Events`, indeed, part of your job will be to
|
Every app will have a different `events`, indeed, part of your job will be to
|
||||||
design exactly the right set of them. For your app, Events will be the "language of the system".
|
design exactly the right set of them. For your app,`events` will be the "language of the system".
|
||||||
They capture intent - most often user intent. They provide the eloquence.
|
They capture intent (generally the user's intent). They provide the eloquence.
|
||||||
|
|
||||||
And they are data.
|
And they are data.
|
||||||
|
|
||||||
And they have to be "executed".
|
|
||||||
|
|
||||||
Here's a collection of events from a drawing app:
|
Here's a collection of events from a drawing app:
|
||||||
```cljs
|
```cljs
|
||||||
(def events
|
(def events
|
||||||
@ -124,14 +122,15 @@ Here's a collection of events from a drawing app:
|
|||||||
])
|
])
|
||||||
```
|
```
|
||||||
|
|
||||||
I'd like you to look upon that collection as you would the following assembler code:
|
I'd like you to look upon that collection as you would the following assembler:
|
||||||
```asm
|
```asm
|
||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
sub eax, 216
|
sub eax, 216
|
||||||
mov BYTE PTR [ebx], 2
|
mov BYTE PTR [ebx], 2
|
||||||
```
|
```
|
||||||
|
|
||||||
Assembler instructions are data, right? They have to be "executed" by a machine.
|
Assembler instructions are data, right? They have to be "executed" by a machine. I'd
|
||||||
|
like you to look back at the collection of events above the same way.
|
||||||
|
|
||||||
> Events are the assembly language of your app. They are instructions. These instructions
|
> Events are the assembly language of your app. They are instructions. These instructions
|
||||||
are data. One after another gets executed by your functioning app.
|
are data. One after another gets executed by your functioning app.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user