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
Hi @brianegan,
I have an issue with the StoreConnector. I am not sure that it is related entirely to Flutter Redux, but I have a StoreConnector in a stateful widget, with an onInit callback in which I dispatch a few actions on the store.
The issue occurs after the first hot reload: the onInit callback is called twice. In fact every time a hot reload occurs, it adds another call so I quickly end up with many duplicate calls/actions.
I can't find the reason why, it must be obvious but I have no idea where to start looking for a hint. The flutter inspector?
The text was updated successfully, but these errors were encountered:
Hmm after putting breakpoints and print statements, the callback is always called once, but the statements in the callback are duplicated after the first hot reload (?!)
Hey there -- I took a look at this and couldn't see it printing multiple statements, but I have seen the Flutter tools report old Logs before. I'm going to tentatively close this out for now since I have tests verifying the code is only called once, but let's keep an eye on it.
The only other thing that could cause this: Are you providing a new, unique key to the StoreConnector widget on each build?
Hi @brianegan,
I have an issue with the StoreConnector. I am not sure that it is related entirely to Flutter Redux, but I have a StoreConnector in a stateful widget, with an onInit callback in which I dispatch a few actions on the store.
The issue occurs after the first hot reload: the onInit callback is called twice. In fact every time a hot reload occurs, it adds another call so I quickly end up with many duplicate calls/actions.
I can't find the reason why, it must be obvious but I have no idea where to start looking for a hint. The flutter inspector?
The text was updated successfully, but these errors were encountered: