Replies: 1 comment
-
A follow up after some experimenting i started to use LiteRef instead of just having global signals final counterRef = Ref.scoped(
(_) => signal(
0,
debugLabel: 'counter',
),
dispose: (signal) => signal.dispose(),
autoDispose: true,
); simple stuff you know.. so when but a new problem just appeared why does using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a couple of questions here regarding the lifecycle of the signal
effect
gets called one time without updating the signal value, why ?I've added auto dispose on the signal and i push and replace the current widget with another and the devtools shows that the signal is still alive but the
effect
has been removed. is this the right behavior ?A follow up on point 2,
Main page =>
counterSignal
and updates it and then push replacement toPage2
<
counterEffect
got disposed>Page2 => Push
MainPage
error! read signal after being disposed? can't update signal because it's disposed?
question is why the signal cannot be re-instantiated and recreate itself because i pushed this page?
Beta Was this translation helpful? Give feedback.
All reactions