Rellum Rellum

S0005: unknown event in feedback clause

Generated from rellum-diagnostics/src/db.rs.

Explanation

~ feedback clauses can react only to event bindings declared in the reactive graph. If an on-clause names something that is not an event, the compiler cannot know when that state update should run.

Common causes

Canonical fixes

Before:

count ~ feedback(
    on pres => count + 1,
    0
)

After:

press = event(button!())
count ~ feedback(
    on press => count + 1,
    0
)

Code example

count ~ feedback(
    on pres => count + 1,
    0
)