Closed
Description
I encoutered a problem when trying to grow my app into having a sub - (view/update/Msg/Model).
fn view(model: &Model) -> Vec<El<Msg>> {
let sidebar = div![
class!["sidebar"],
];
let mut result = vec![sidebar];
for (prop_id, prop) in &model.properties {
result.push(property::view(prop).map_message(|m| Msg::Property(prop_id, m)));
}
result
}
This will not compile because map_message is not accepting closures, needs to be generic to do that.
In my case it has be a closure since it is dynamically adding an unique identifier to each message.
Metadata
Metadata
Assignees
Labels
No labels