-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xilem_web: An example using AnyDomView would be super helpful #459
Comments
Hmm we really have to work on the error messages... I just discovered that we don't currently have the You're right, we should probably add a simple example that shows the use of In your case an
Good to hear :) |
Hmm I don't think #460 fixes this, I'll keep it open until we have a small example for |
Whoops forget about that, I missed the |
Yah my code is definitely wrong 😅 I just tried #460, and it works perfectly. With that PR, my actual code is: ul(
state
.packages
.iter()
.map(|(hash, manifest)| {
li(
if let Some(handler) = state.handlers.get(&manifest.ty().into()) {
html::button(manifest.name.clone()).boxed()
} else {
manifest.name.clone().boxed()
},
)
})
.collect::<Vec<_>>(),
), |
@Philipp-M what's the status of this issue now? You set #460 to not auto-close this, so I presume there must still be follow-up needed? |
I wanted to add the |
I'm trying to make a
<li>
which can have one of two types, either a button or text node, depending on the state.I tried to do something like:
But got a bunch of errors:
rustc output
I took a look at the examples, but didn't find any usage of AnyDomView. Am I trying using AnyDomView in the right way here, or is another approach required?
By the way, so far having a lot of fun with xilem_web, so thanks for putting it out there!
The text was updated successfully, but these errors were encountered: