GX4007: value or operator is not allowed in a client expression
A client expression uses a value or an operator that does not give the same result in Go and in JavaScript.
Cause
A client expression uses a value or an operator that does not give the same result in Go and in JavaScript. bind: takes one signal and no other expression.
Example
package cart
signals {
Qty int = 1
}
<input bind:value={$Qty + 1} />gx check reports:
cart/Cart.gx:7:20: GX4007: bind: targets one signalFix
- For
bind:, give the signal only, for examplebind:value={$Qty}. - For other directives, use
bool,string,intandfloat64values with the operators that the two languages share.