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
Use `return` syntax to returnresult. For example, the following code returns `3`.
60
58
@@ -72,15 +70,15 @@ return query2.run()
72
70
The `return` statement is not necessary for scenarios where you want to omit results.
73
71
{% endhint %}
74
72
75
-
### Access data
73
+
## Access data
76
74
77
75
Use JS queries to access data in your app. Notice that there's no need to use `{{ }}` notation.
78
76
79
77
```javascript
80
78
var data = [input1.value, query1.data, fileUpload.files[0].name];
81
79
```
82
80
83
-
### Control component
81
+
## Control component
84
82
85
83
In JS queries, you can use methods exposed by components to interact with UI components in your app. Such operation is not supported by the inline JS code in `{{}}`.
86
84
@@ -93,9 +91,9 @@ input1.setValue("Hello");
93
91
The `input1.setValue()` method (or other component methods) is asynchronous and returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Promise) object. Accessing `input1.value` immediately after setting the value of `input1` does not return the updated value.
94
92
{% endhint %}
95
93
96
-
### Run query
94
+
## Run query
97
95
98
-
#### `run()` method and callbacks
96
+
### `run()` method and callbacks
99
97
100
98
Call `run()` method to run other queries, for example:
0 commit comments