Developing Web Applications with Nim
0:
tasks->add($data)
app.router()
for task in tasks:
# Component usage
component TodoItem:
{task}
tasks->add($data)
app.router()
for task in tasks:
# Component usage
component TodoItem:
{task}
Here we imported the renamed component, then created a list of tasks, then changed the template.
In the template, the button was bound to change the list and redraw.
You can see the end result below: