intendednull / yewdux

Ergonomic state management for Yew applications
https://intendednull.github.io/yewdux/
Apache License 2.0
322 stars 31 forks source link

Preserve reduce_mut return value #68

Closed intendednull closed 11 months ago

intendednull commented 11 months ago

Previously the returned value of reduce_mut was dropped. Now that value is returned to the caller:

let previous_count = dispatch.reduce_mut(|state| {
    let previous_count = state.count;

    state.count += 1;

    previous_count
});