You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling VirtualDom::new_with_props prints out the following error:
ERROR It looks like you called the component <the component> like a function instead of a component. Components should be called with braces like <the component> { prop: value } instead of as a function
Here's a code example:
use dioxus::{
desktop::{wry::dpi::Size,Config,WindowBuilder},
prelude::*,};fnmain(){
dioxus::launch(App);}#[component]fnApp() -> Element{rsx!{Hero{}}}#[component]pubfnComponent(sig:Signal<Vec<i32>>) -> Element{rsx!{"Component"}}#[component]pubfnHero() -> Element{let sig = use_signal(Vec::<i32>::new);rsx!{
button {
onclick: move |_| {
dioxus::desktop::window().new_window(VirtualDom::new_with_props(Component,ComponentProps{ sig }),Config::default(),);}}}}
Strangely enough though the app itself seems to work fine.
Environment:
Dioxus version: 0.6.3
Rust version: 1.85
OS info: Arch
App platform: desktop
Questionnaire
I'm interested in fixing this myself but don't know where to start.
The text was updated successfully, but these errors were encountered:
Problem
Calling VirtualDom::new_with_props prints out the following error:
Here's a code example:
Strangely enough though the app itself seems to work fine.
Environment:
Questionnaire
I'm interested in fixing this myself but don't know where to start.
The text was updated successfully, but these errors were encountered: