@elibroftw regarding your demo code error, I ran into this exact issue as well when trying out the examples. The error is misleading at first glance because it looks like a generic type mismatch, but the fix is straightforward.
@kennykerr's intro to windows-reactor post (first comment of this PR) and some docs show the render function signature as:
fn app(cx: &mut RenderCx) -> impl Into<Element> {
But if you check App::render() in the source, its bound is:
pub fn render<F>(self, f: F) -> Result<()> where F: Fn(&mut RenderCx) -> Element + Send + 'static,
It requires a concrete Element, not impl Into<Element>. The impl Into<Element> return type is an opaque type that the compiler can't prove satisfies the bound, so it rejects the call.
To fix, just change the return type of your view function to Element and append .into() to your builder:
fn app(cx: &mut RenderCx) -> Element { // ... vstack((...)) .spacing(8.0) .into() // ← converts the builder into Element }
You can see this pattern in the working sample apps in the repo, like the calendar_view example:
fn app(cx: &mut RenderCx) -> Element { let (count, set_count) = cx.use_state(0_u32); let bump = move || set_count.call(count + 1); vstack(( calendar_view().today_highlighted(true).on_changed(bump), text_block(format!("Selection changed {count} time(s)")), )) .spacing(8.0) .into() }
In short: always return Element + .into(), not impl Into<Element>.