why i need LocalResource when i just give signal directly #3734
-
why i need LocalResource when i can just give signal directly |
Beta Was this translation helpful? Give feedback.
Answered by
gbj
Mar 20, 2025
Replies: 1 comment 1 reply
-
Using a signal with |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
erlangparasu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using a signal with
Option<T>
is also fine -- the advantage of LocalResource is that it can be.await
-ed (for example, insideSuspend::new(...)
, and that it integrates with Suspense, which is really useful if you have a mix of local and non-local resources or if you want built-in machinery for fallback states.