-
-
Notifications
You must be signed in to change notification settings - Fork 774
Open
Description
Describe the bug
Using 0.7.0-rc0
, the view!
macro does not compile if leptos::prelude::ElementChild
is not in scope.
Leptos Dependencies
leptos = { version = "0.7.0-rc0", default-features = false, features = ["csr"] }
To Reproduce
The code below will not compile without use leptos::prelude::ElementChild
on line 3. Adding #[component]
does not change the result, so I have removed it to minimize the code.
use leptos::{view, prelude::ClassAttribute, IntoView};
// this is not referenced directly anywhere
use leptos::prelude::ElementChild;
#[allow(non_snake_case)]
pub fn BadView(title: String, body: String) -> impl IntoView {
view! {
<div class="content"><hgroup>
<h1>{title}</h1>
</hgroup></div>
<div class="content">{body}</div>
}
}
Expected behavior
The code should compile.
Screenshots
Metadata
Metadata
Assignees
Labels
No labels