You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reactivity.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,14 @@ The reactive API and its use are simple and practical, even if the description i
28
28
29
29
*Graphs C, D & E show chained reactions, where some targets are, themselves, reactors, setting up a chain of relations that can have any shape.*
30
30
31
-
Reactions are run asynchronously, when a source field(s) value is changed. The reaction relationship is maintained until the reaction is explicitly destroyed using `react/unlink` or `clear-reactions`.
31
+
Reactions are run asynchronously, when a source field's value is changed. The reaction relationship is maintained until the reaction is explicitly destroyed using `react/unlink` or `clear-reactions`.
32
32
33
33
Only the source objects in a reactive expression need to be a reactor. The target can be a simple object. If the target is also a reactor, reactions are chained and a graph of relations is constructed implicitly.
34
34
35
35
Notes:
36
-
* Red's reactive support could be extended in the future to also support a "pull" model.
36
+
* Red's reactive support could be extended in the future to support a "pull" model.
37
37
* This is not a [FRP](https://en.wikipedia.org/wiki/Functional_reactive_programming) framework, though event streams could be supported in the future.
38
-
* The Red/View GUI engine relies on *face!* objects in order to operate graphic objects. Faces are reactors, and they can be used for setting reactive relations between faces or with non-reactor objects.
38
+
* The Red/View GUI engine relies on *face!* objects in order to operate on graphic objects. Faces are reactors, and they can be used for setting reactive relations between faces or with non-reactor objects.
39
39
40
40
## Glossary
41
41
@@ -61,7 +61,7 @@ The simplest form of reactions is a "static relation" created between *named* ob
61
61
b: base react [b/color/1: to integer! 255 * s/data]
62
62
]
63
63
64
-
This example sets a reactive relation between a slider named `s` and a base face named `b`. When the slider is moved, the base face's background red component is changed accordingly. The reactive expression cannot be re-used for a different set of faces. This is the simplest form of reactive behavior for graphic objects in Red/View.
64
+
This example sets a reactive relation between a slider named `s` and a base face named `b`. When the slider is moved, the red component of the base face's background color is changed accordingly. The reactive expression cannot be re-used for a different set of faces. This is the simplest form of reactive behavior for graphic objects in Red/View.
0 commit comments