-
Notifications
You must be signed in to change notification settings - Fork 219
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
Initializing stuff with store.dispatch #11
Comments
Hey hey :) I can't speak to a custom implementation you've got going, but if you're using the "out of the box" To fix up your own implementation, the Trick I use: the https://github.com/brianegan/flutter_redux/blob/master/lib/flutter_redux.dart#L155 Do either of those options work for ya? |
The first option did it, thanks! I wasn't aware of the |
Hi,
I have this pattern where I initially injected a store instance in all my components using it (I wasn't aware of
new StoreProvider.of(...)
).In my App, in some places, I also do 1 time initializations (ie: fetch data via
store.dispatch(...)
) ininitState()
. Previously, I could do it fine, because I had an instance of my Store.Now I tried to move towards to
new StoreProvider.of(...)
, but I faced the issue wherecontext.inheritFromWidgetOfExactType(StoreProvider)
can't be called ininitState
. Is there a way to achieve that somehow?Seems like the Flutter docs suggest that I use
didChangeDependencies()
but that is not called only 1 time.Thanks
The text was updated successfully, but these errors were encountered: