Skip to content
Discussion options

You must be logged in to vote

This seems to suggest something like Signal::derive(|| resource.map(|user| /* do something */)) would be appropriate for your use case.

I'd also note though that it's almost certainly the case that cloning User is not going to be significant relative to the overall cost of doing things like rendering your UI in the DOM. (I'm assuming User is something like a handful of string fields)

Also, Rc is serializable, you just need to have the rc feature enabled on serde.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jonahlund
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