Skip to main content

reduce_with

Macro reduce_with 

Source
macro_rules! reduce_with {
    ($handler:expr $(,)?) => { ... };
}
Expand description

Coerces a reducer function item or non-capturing closure to the handler function-pointer type Rust can infer from the surrounding ctx.bind(...) call.

use fission::prelude::*;

let on_press = with_reducer!(ctx, Increment, on_increment);