riverpod_reducer 0.2.0
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 tomiddleware()and now returnsFuture<E?>instead ofFuture<S>.- Return the event (or a modified event) to pass it to
reduce(). - Return
nullto drop/block the event. - Middleware no longer mutates state directly — all state transitions flow through
reduce().
- Return the event (or a modified event) to pass it to
- Removed bloc-style pattern (side effects in
applyEvent). Use named methods withdispatch()for async workflows.
0.1.0 #
- Initial release.
ReducerNotifier<S, E>base class with queued initialization pattern.bind()andbindAsync()for reactive dependency bindings.applyEvent()middleware hook for logging and event interception.- Pure
reduce()function for testable state transitions.