-
Notifications
You must be signed in to change notification settings - Fork 220
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
Builder is called even when state is not changed #193
Comments
Heya @guyo13 -- When you open or close a drawer, Flutter is pushing a new route to the Navigator. This also causes most Widgets to rebuild -- so that's nothing to worry about. On the other hand, if you're seeing your StoreConnectors rebuilding whenever you change focus, that sounds like a bug either in your app or Flutter Redux. However, I have tests in place specifically to verify Connectors only rebuild when they should, not on any little interaction, and I haven't seen that behavior in my own apps. Do you happen to have a small sample that reproduces the error? |
I am working on an app where I use StoreConnectors heavily, I started noticing that the
builder
callback is being called - sometimes more than once - even if I don't make any changes to the state.This happens when I for example open/close a Drawer or change focus between TextFields.
All my StoreConnectors are set to
distinct=true
and view models correctly implement operator == and hashCodeand really if the vms don't change then onDidChange is not fired.
I just don't understand why all those StoreConnectors keep firing their builders on every small user interaction.
Would be appreciated if anyone can help me understand why is this happening
The text was updated successfully, but these errors were encountered: