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
-`prefix`: JSX props prefix for directives. Default: "x", example usage: `x-if`
72
72
-`pragmaType`: Help internal to correctly identify some syntax, such as hooks. Default: "React"
73
73
74
74
## <spanid="toc-directives">Directives</span>
@@ -120,7 +120,7 @@ const foo = (
120
120
```
121
121
122
122
### <spanid="toc-directives-x-show">x-show</span>
123
-
The `x-show` controls the display or hiding of elements by the `display` of the `style` prop. If the `x-show` value is **falsy**, will set `style.display = "none"`, otherwise do nothing.
123
+
The `x-show` controls the display or hiding of elements through the `display` of the `style` prop. If the `x-show` value is **falsy**, will set `style.display = "none"`, otherwise do nothing.
The `x-model` is a syntax sugar similar to vue `v-model`, which binds a state to the `value` prop of the **form element** and automatically updates the state when the element is updated.
232
-
It resolves the updated value by calling the [resolveValue method](./runtime/resolve-value.js) (If the first argument `arg` is non-empty, and `arg.target` is an object, return `arg.target.value`, otherwise return `arg`).
232
+
It resolves the updated value by calling the [resolveValue method](./runtime/resolve-value.js) (If the first argument `arg` is non-null, and `arg.target` is a HTMLElement, return `arg.target.value`, otherwise return `arg`).
233
233
234
234
**Example:**
235
235
```jsx harmony
@@ -377,7 +377,7 @@ class Foo extends React.Component {
The `x-model-hook` is similar to the `x-model`, the difference is that the `x-model-hook` is used in the **useState hook function**, and the `x-model` is used in the **class component**.
380
+
The `x-model-hook` is similar to the `x-model`, the difference is that the `x-model-hook` is used in the function component with *useState hook*, and the `x-model` is used in the *class component*.
0 commit comments