GX4005: call is not allowed in a client expression
A client expression calls a function that has no JavaScript form.
Cause
A client expression calls a function that has no JavaScript form. A client expression can call the functions of package gxc only.
Example
package cart
import "strings"
signals {
Name string = ""
}
<p show={strings.Contains($Name, "a")}>Has an a</p>gx check reports:
cart/Cart.gx:9:10: GX4005: only gxc helpers are allowed in a client expressionFix
- Use a
gxcfunction when one does the work. - Or calculate the value on the server and pass it as a prop.