@webqit/subscript
Advanced tools
Comparing version 2.0.21 to 2.0.22
@@ -11,3 +11,3 @@ { | ||
"homepage": "https://webqit.io/tooling/subscript", | ||
"version": "2.0.21", | ||
"version": "2.0.22", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": { |
@@ -187,3 +187,3 @@ # Subscript | ||
Variable declarations within the function belong in their own scope and do not respond to outside events. But when they do reference variables from the outside scope, they are included in the dependency thread of those outside variables. | ||
Variable declarations within the function belong in their own scope and do not respond to outside events. But their containing expression may also maintain a binding to those variables from the outside scope. | ||
@@ -649,3 +649,3 @@ ```js | ||
The following syntaxes are interchangeable... | ||
The following syntaxes produce a reactive function... | ||
@@ -682,2 +682,3 @@ ```js | ||
let result = sum( score, 100 ); | ||
// and "callCount" is logged as "1" to the console | ||
@@ -689,2 +690,3 @@ console.log( 'Number of times we\'ve summed:', callCount ); | ||
let result = sum.thread( [ 'a' ] ); | ||
// and "callCount" is still logged as "1", not "2", to the console | ||
@@ -836,4 +838,6 @@ console.log( 'Number of times we\'ve summed:', callCount ); | ||
The `.thread()` method is the *reactivity* API in Subscript functions that lets us send *thread events* into the *reactivity runtime*. It takes a list of the outside variables or properties that have changed; each as an array path. | ||
The `.thread()` method is the *reactivity* API in Subscript functions that lets us send *thread events* into the *reactivity runtime*. It constitues one clear interaction point and enables a one-liner approach to reactivity. | ||
It takes a list of the outside variables or properties that have changed; each as an array path. | ||
##### Syntax | ||
@@ -840,0 +844,0 @@ |
3505263
1045