Clean up a number of examples

This commit is contained in:
Jonathan Kelley committed 2024-01-15 13:06:05 -08:00
1 parent f2caa3a3ad
commit 6134a2ce24
30 files changed
+284 -413

No files matched your search

+4 -4
View File
@@ -23,8 +23,8 @@ use tao::event::{Event, StartCause, WindowEvent};
/// })
/// }
/// ```
pub fn launch(root: fn() -> Element) {
launch_with_props(|root| root(), root, Config::default())
pub fn launch(app: fn() -> Element) {
launch_with_props(|root| root(), app, Config::default())
}
/// Launch the WebView and run the event loop, with configuration.
@@ -47,8 +47,8 @@ pub fn launch(root: fn() -> Element) {
/// })
/// }
/// ```
pub fn launch_cfg(root: Component, config_builder: Config) {
launch_with_props(root, (), config_builder)
pub fn launch_cfg(app: fn() -> Element, config_builder: Config) {
launch_with_props(|props| props(), app, config_builder)
}
/// Launch the WebView and run the event loop, with configuration and root props.