One interface. Room to respond.
Describe the input, button, state, and contract call together. The same task interface adapts to a browser, Android Emulator, and iOS Simulator.
use contract Tasks from "tasks" audience "mobile"
page Home {
state draft: String = ""
query tasks = Tasks.list_tasks()
mutation create = Tasks.create_task(title: draft)
action submit() {
create.run()
draft = ""
}
view {
View {
Text("Today’s focus")
Input(value: draft, placeholder: "Add a task")
Button(label: "Add task", on_press: submit)
List(items: tasks.data, key: |task| task.id) {
task => Text(task.title)
}
}
}
} Today’s focus
A little progress, every day.
axiom run main.acore --target webInteractive design preview using shared in-page task state. Acore excerpt adapted from the public Tasks example; loading/error branches and styles are omitted. Native runs require a configured UI Host and emulator or simulator.
Open the Acore UI example ↗