Update
The update action allows us to update a property of a component.
Args
- component property in the format
[component name].[property]
- the new value
Example
"onClick": [ { "fn": "update", "args": ["nav.label", "Jaseci 2.0"], } ]
Alert
Runs the browser alert function.
Args
- alert message
Example
"onClick": [
{
"fn": "add",
"args": [1, 3],
}
]
Call Endpoint
Runs the browser alert function.
Properties
- endpoint - the api url that will be called
Args
- HTTP Verb
- Request body
Example
"onClick": [
{
"fn": "callEndpoint",
"endpoint": "http://localhost:3334/message",
"args": [
"POST",
{
"message": "Hello!"
}
]
}
]
Append
Adds a component as a child of another component.
Args
- component name
- component structure - the child component
Example
"onClick": [
{
"fn": "append",
"args": ["msgs",
{
"component": "Text",
"props": {
"value": "Hello"
}
}
],
}
]