Replies: 1 comment
-
For any component except the app component, you need to derive props as described here: https://dioxuslabs.com/learn/0.4/reference/component_props If you need to provide the AppProps to multiple components throughout your app, it might be easier to provide the props through the context api so that you don't need to pass it as props repeatedly (This looks like a request for help, not an issue or feature request, so I converted this to a discussion) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Rust dioxus 0.4.*, the main method creates a channel that will not be closed through futures_channel::mpsc::unbounded, and then passes the channel dioxus_desktop::launch_with_props to the next app(cx: Scope< AppProps>) method, in the app method, Dioxus Router is used to define enumeration methods to do different routing methods, and then how can we receive something like Home(cx: Scope<AppProps>) cx.props?
The error prompted is implemented dioxus::prelude::Properties. How should I write it in impl?
Refer to this example: https://github.com/DioxusLabs/example-projects/blob/master/wifi-scanner/src/main.rs
Beta Was this translation helpful? Give feedback.
All reactions