Skip to content

Commit 25f71ca

Browse files
authored
Merge pull request #10 from cmontella/fix-quickstart
update quickstart
2 parents 31f898f + 8c63430 commit 25f71ca

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

v0.3/tutorials/quickstart.eve

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This guide is a 5 - 10 minute introduction to the essential concepts in Eve. If
1111
npm start -- eve-starter/programs/quickstart.eve
1212
```
1313

14-
Eve documents are written in Markdown. Eve code is written in blocks, delinated by Markdown code fences (matching pairs of ``` or ~~~ surrounding a section of code). These blocks of code search for and create records, which are key value pairs attached to a unique ID.
14+
Eve documents are written in Markdown. Eve code is written in blocks, delineated by Markdown code fences (matching pairs of ``` or ~~~ surrounding a section of code). These blocks of code search for and create records, which are key value pairs attached to a unique ID.
1515

1616
## Adding records to Eve
1717

@@ -38,13 +38,20 @@ bind
3838
[#ui/text text: message]
3939
~~~
4040

41-
Searches find records that matches the supplied pattern, in this case records tagged greeting with a message attribute. You use these results to create new records. In this block, we create a `#ui/text` record for every message that is found. If no records match the search, the block has no effect. Try adding another `#greeting` record in the first block to see what happens when more than one record matches the search.
41+
Searches find records that matches the supplied pattern, in this case records tagged greeting with a message attribute. You use these results to create new records. In this block, we create a `#ui/text` record for every message that is found (the UI library looks for records tagged `#ui/text` and draws them as DOM elements in the browser). If no records match the search, the block has no effect. Try adding another `#greeting` record in the first block to see what happens when more than one record matches the search.
4242

4343
Variables with the same name are equivalent within a block; because they have the same name, the `message` in `[#greeting message]` and `[#ui/text text: message]` are equivalent.
4444

4545
## Records update as data changes
4646

47-
Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. Let's search for the current time, and display it on the screen:
47+
Blocks in Eve react automatically to changes in data. When a record changes, any bound records are automatically updated. We can see this in action by outputting the current time. First we create a timer that ticks once every second:
48+
49+
~~~eve
50+
commit
51+
[#time #system/timer resolution: 1000]
52+
~~~
53+
54+
Now we can search for the current time, and display it on the screen:
4855

4956
~~~eve
5057
search
@@ -77,7 +84,7 @@ commit
7784

7885
Clicks only last for an instant, but we want to create a permanent record of each click so we can search for them later. This block commits a `#clicked` record that will persist until it's explicitly removed. Much like the `#greeting` text we bound to the `#ui`, variables with the same name are equivalent, so the variable `event` in the `#clicked` record is a reference to the `#html/event/click` on the `#increment` button.
7986

80-
The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are identical in Eve. We included the `event` attribute in the `#clicked` record to differentiate each record. Without this differentiation, we could only ever create a single `#clicked` record.
87+
The identity of a record is determined by its attribute/value pairs. Two records with the same attributes and values are the same record in Eve. We included the `event` attribute in the `#clicked` record to differentiate each record. Without this differentiation, we could only ever create a single `#clicked` record.
8188

8289
## Count the number of clicks
8390

@@ -109,11 +116,4 @@ This will get you started with Eve, but there's still more to learn. From here,
109116
- Advance to Level 2 of the introductory tutorial (coming soon).
110117
- View the [syntax reference](../syntaxreference) or the [library reference](../handbook/libraries).
111118
- Explore already made [examples](https://github.com/witheve/eve-examples).
112-
- Or dive right in to the editor and try out the concepts you've just learned (coming soon).
113-
114-
## Appendix
115-
116-
~~~eve
117-
commit
118-
[#time #system/timer resolution: 1000]
119-
~~~
119+
- Or dive right in to the editor and try out the concepts you've just learned (coming soon).

0 commit comments

Comments
 (0)