docs: update local examples and docs to support new syntaxes

This commit is contained in:
Jonathan Kelley committed 2021-12-15 15:56:53 -05:00
1 parent e495b09bf1
commit 4de16c4779
118 files changed
+520 -1154

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ fn syntax_works() {
use dioxus_hooks::*;
use dioxus_html as dioxus_elements;
static App: FC<()> = |cx, props| {
static App: Component<()> = |cx| {
cx.render(rsx! {
// left window
WebviewWindow {
+7 -1
View File
@@ -6,6 +6,9 @@
mod cfg;
mod escape;
mod events;
pub use wry;
pub use wry::application as tao;
// mod desktop_context;
use cfg::DesktopConfig;
@@ -28,7 +31,10 @@ use wry::{
webview::{WebView, WebViewBuilder},
};
pub fn launch(
pub fn launch(root: Component<()>) {
launch_with_props(root, (), |c| c)
}
pub fn launch_cfg(
root: Component<()>,
config_builder: impl for<'a, 'b> FnOnce(&'b mut DesktopConfig<'a>) -> &'b mut DesktopConfig<'a>,
) {