pub fn view_get_counter(_ctx: &ScViewContext, f: &GetCounterContext) {
    let counter = f.state.counter();
    if counter.exists() {
        f.results.counter().set_value(counter.value());
    }
}
// note that get_counter mirrors the state of the 'counter' state variable
// which means that if the state variable was not present it also will not be present in the result
note that get_counter mirrors the state of the 'counter' state variable
which means that if the state variable was not present it also will not be present in the result
note that get_counter mirrors the state of the ' counter ' state variable which means that if the state variable was not present it also will not be present in the result
pub fn view_get_counter(_ctx: &ScViewContext, f: &GetCounterContext) {
    let counter = f.state.counter();
    if counter.exists() {
        f.results.counter().set_value(counter.value());
    }
}
pub fn view_get_counter ( _ctx : & ScViewContext , f : & GetCounterContext ) { let counter = f . state . counter ( ) ; if counter . exists ( ) { f . results . counter ( ) . set_value ( counter . value ( ) ) ; } }
note that get_counter mirrors the state of the 'counter' state variable
which means that if the state variable was not present it also will not be present in the result
note that get_counter mirrors the state of the ' counter ' state variable which means that if the state variable was not present it also will not be present in the result
_ctx
&ScViewContext
f
&GetCounterContext