Skip to main content

visible_task

Macro visible_task 

Source
macro_rules! visible_task {
    ($js:expr $(, $($cap:ident),+ $(,)?)?) => { ... };
}
Expand description

Register a client-only visible task with automatic signal capture wiring.

visible_task!(r#"
    (async (state, __resuma) => {
        const next = await __resuma.action("list_todos", []);
        state.todos.set(next);
    })
"#, todos, ui);