You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2019. It is now read-only.
12:40:44.015 1 info flutter.tools flutter: Before action: Increment: Instance of 'State'
12:40:44.015 2 info flutter.tools flutter: in action: Increment: Instance of 'State'
12:40:44.015 3 info flutter.tools flutter: Before action: Increment: Instance of 'State'
12:40:44.015 4 info flutter.tools flutter: After action: Increment: Instance of 'State'
12:40:44.038 5 info flutter.tools flutter: Building counter: 1
The text was updated successfully, but these errors were encountered:
I'm adding a [wontfix] for now because this isn't a bug, it is a expected behavior. Before middlewares are indeed computed twice at redurx.dart#L47 and redurx.dart#L50. That is because being a asynchronous execution, the first call is right after the Action dispatch e the second call is when Action fulfilled its asynchronous behavior, but didn't added it's computation as a new state to the Store.
But sure, I would like to discuss if this is a good behavior. What do you think? Are you having trouble with it?
Dispatch an
AsyncAction
invokes the middleware'sbeforeAction
method twice.I tweak a little on your example:This will output
The text was updated successfully, but these errors were encountered: