make the root component take no arguments
This commit is contained in:
1 parent
8fe2515413
commit
404c864246
26 files changed
+46
-47
No files matched your search
@@ -105,8 +105,12 @@ mod rehydrate;
|
||||
/// render!(div {"hello world"})
|
||||
/// }
|
||||
/// ```
|
||||
pub fn launch(root_component: fn(()) -> Element) {
|
||||
launch_with_props(root_component, (), Config::default());
|
||||
pub fn launch(root_component: fn() -> Element) {
|
||||
launch_with_props(
|
||||
|root_component| root_component(),
|
||||
root_component,
|
||||
Config::default(),
|
||||
);
|
||||
}
|
||||
|
||||
/// Launch your app and run the event loop, with configuration.
|
||||
|
||||
Reference in new issue
Block a user