Skip to content
Discussion options

You must be logged in to vote

Using a signal with Option<T> is also fine -- the advantage of LocalResource is that it can be .await-ed (for example, inside Suspend::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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@erlangparasu
Comment options

Answer selected by erlangparasu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants