fix: readme and examples syntax
This commit is contained in:
1 parent
f24aae8787
commit
3dc0e59876
102 files changed
+213
-1222
No files matched your search
@@ -56,7 +56,7 @@ pub struct WebviewWindowProps<'a> {
|
||||
///
|
||||
///
|
||||
///
|
||||
pub fn WebviewWindow(cx: Context, props: &WebviewWindowProps) -> Element {
|
||||
pub fn WebviewWindow(cx: Scope<WebviewWindowProps>) -> Element {
|
||||
let dtcx = cx.consume_state::<RefCell<DesktopContext>>()?;
|
||||
|
||||
cx.use_hook(
|
||||
@@ -78,7 +78,7 @@ pub fn WebviewWindow(cx: Context, props: &WebviewWindowProps) -> Element {
|
||||
pub struct WindowHandle {}
|
||||
|
||||
/// Get a handle to the current window from inside a component
|
||||
pub fn use_current_window(cx: Context) -> Option<WindowHandle> {
|
||||
pub fn use_current_window(cx: Scope) -> Option<WindowHandle> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ fn syntax_works() {
|
||||
use dioxus_hooks::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
static App: Component<()> = |cx| {
|
||||
static App: Component = |cx| {
|
||||
cx.render(rsx! {
|
||||
// left window
|
||||
WebviewWindow {
|
||||
|
||||
@@ -28,11 +28,11 @@ use wry::{
|
||||
webview::{WebView, WebViewBuilder},
|
||||
};
|
||||
|
||||
pub fn launch(root: Component<()>) {
|
||||
pub fn launch(root: Component) {
|
||||
launch_with_props(root, (), |c| c)
|
||||
}
|
||||
pub fn launch_cfg(
|
||||
root: Component<()>,
|
||||
root: Component,
|
||||
config_builder: impl for<'a, 'b> FnOnce(&'b mut DesktopConfig<'a>) -> &'b mut DesktopConfig<'a>,
|
||||
) {
|
||||
launch_with_props(root, (), config_builder)
|
||||
|
||||
Reference in new issue
Block a user