Hooks allow some very powerful provider:
HookProvider<MyBloc>(
value: () {
final bloc = useMemoized(() => MyBloc());
useEffect(() => bloc.dipose, [bloc]);
return bloc;
},
child: Container();
);
I'm watching this.
I'm still hesitating. This would add a new dependency on provider
package. Peoples may not want to download flutter_hooks when using
Provider
On Wed, Jan 23, 2019, 19:16 Jeremiah Ogbomo <[email protected] wrote:
I'm watching this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rrousselGit/provider/issues/9#issuecomment-456909629,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATO0bS2f7ESnzuc8zqlP9mdWK7pytHaCks5vGKcJgaJpZM4aOttx
.
Will do.
This allows to heavily simplify the implementation of other providers (as a StreamProvider is just a useStream hook on a HookProvider)
Which means I can _finally_ continue that hanging PR because I won't have to reimplement the whole world.
I haven't been updating for a while, I completely missed when you removed this.
Do you need it?
I had on an older project that needed revamp but its fine I replaced it with the generic provider. Big ups!
Good! Because I have other plans that are incompatible with HookProvider, and Provider seems to solve all the use-cases anyway. 😄