StatefulRearchConsumer
?
#45
-
Seems that Maybe I'm wrong and it exists... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well it is actually most comparable to
That's right, they are abstracted away from you via side effects. You should use side effects when in a RearchConsumer.
There are other lifecycle methods, but I haven't bothered to add support for them yet since I haven't had a need to (and they seem pretty unlikely to be needed when you're building an app with ReArch). If you happen to need one of these other methods, please raise an issue with a use case for it and I may add it in.
I don't think I want to add |
Beta Was this translation helpful? Give feedback.
Well it is actually most comparable to
StatefulWidget
, but just abstracting the OOP away from you.That's right, they are abstracted away from you via side effects. You should use side effects when in a RearchConsumer.
initState
anddispose
are handled byuse.callonce
anduse.effect
.deactivate
is handled via a newregisterFooBar
on theWidgetSideEffectApi
(so you will need to do ause.register()
to add a deactivate listener).There are other lifecycle methods, but I haven't bothered to add support for them yet since I haven't had a need to (and they…