riverpod_reducer 0.2.0 copy "riverpod_reducer: ^0.2.0" to clipboard
riverpod_reducer: ^0.2.0 copied to clipboard

A pure reducer pattern for Riverpod notifiers. Separates state initialization from reactive bindings with a single reduce(State, Event) → State function.

0.2.0 #

  • BREAKING: applyEvent() renamed to middleware() and now returns Future<E?> instead of Future<S>.
    • Return the event (or a modified event) to pass it to reduce().
    • Return null to drop/block the event.
    • Middleware no longer mutates state directly — all state transitions flow through reduce().
  • Removed bloc-style pattern (side effects in applyEvent). Use named methods with dispatch() for async workflows.

0.1.0 #

  • Initial release.
  • ReducerNotifier<S, E> base class with queued initialization pattern.
  • bind() and bindAsync() for reactive dependency bindings.
  • applyEvent() middleware hook for logging and event interception.
  • Pure reduce() function for testable state transitions.
1
likes
160
points
87
downloads

Documentation

API reference

Publisher

verified publisherloreium.app

Weekly Downloads

A pure reducer pattern for Riverpod notifiers. Separates state initialization from reactive bindings with a single reduce(State, Event) → State function.

Repository (GitHub)
View/report issues

Topics

#riverpod #state-management #reducer

License

MIT (license)

Dependencies

meta, riverpod

More

Packages that depend on riverpod_reducer