Closed Maksimka101 closed 11 months ago
This is not true. Please reread the function: It returns the value from the chain of middleware (specified by the consumer of this library), and this is the intention from the original JS library on which this is inspired.
Changing the signature to void
would break many middleware in the wild, such as the thunk
middleware. There are even tests for this functionality here:
https://github.com/fluttercommunity/redux.dart/blob/master/test/middleware_test.dart#L94
I've noticed that
Store.dispatch
method doesn't return anything. Never. So it would be a good idea to specify itNextDispatcher
typedef also should returnvoid
, not adynamic
I can create a pull request with this change, if you agree with me