-
Hello everyone, I'm new to Leptos and playing around the other day I've tried to use an
Here is my code. I put this together following various examples in the book but got very stuck as the compiler rightly tells me that due to ownership of so here's my question: did I miss out something really obvious being new with the framework (and rust!), or is it something that due to the I do acknowledge that maybe the whole design of the interaction might be a bit weird - but suggestions on making that more sensical might be a bit outside the scope of the question, I really want to understand whether something similar is reasonable at all with an Many thanks in advance! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Here's a working version of these lines: <ActionForm action=save_fields
// clones `initial_data` before moving it into the children of `ActionForm`
clone:initial_data
>
<input
type="text"
prop:value=move || {
let existing_data = initial_data
// clones `initial_data` so it can be used to update this value multiple times
.clone() Here's another approach to the same kind of thing without needing to clone the value like that. I'm not sure this actually works as you're intending but hopefully you can see the point!
|
Beta Was this translation helpful? Give feedback.
Here's a working version of these lines:
Here's another approach to the same kind of thing without needing to clone the value like that. I'm not sure this actually works as you're intending but hopefully you can see the point!