-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isExecuting and canExecute are constantly recreated #36
Comments
Hi, that is indeed an interesting point. I change it and check if all is still working |
Please give the new version 5.02 a test |
Have you tried it? |
Hi, the update is working :) no infinite rebuilds |
escamoteur
added a commit
that referenced
this issue
Mar 19, 2020
mk-dev-1
pushed a commit
to mk-dev-1/rx_command
that referenced
this issue
Mar 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i was using flutter_hooks (but the problem will probably show for streambuilder, provider etc. as well) where i have a widget like this:
The problem is, useStream will listen to a stream until it receives a new stream, then it will unsub to the previous and listen to the new stream...
isExecuting is a BehaviorSubject and immediately pushes the latest value, which useStream will take and calls setState();
Now the HookBuilder will build again, cmd.isExecuting returns a new stream, useStream will listen to the new stream, gets the first value from BehaviorSubject and rebuilds the widget... and again and again.
I can solve this with
cmd.isExecuting.skip(1)
but wouldn't it be better to changeinto
The text was updated successfully, but these errors were encountered: