make the root component take no arguments

This commit is contained in:
Evan Almloff committed 2024-01-11 10:48:04 -06:00
1 parent 8fe2515413
commit 404c864246
26 files changed
+46 -47

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus::prelude::*;
fn main() {}
fn app(cx: Scope) -> Element {
fn app() -> Element {
let count: &RefCell<Vec<Element>> = cx.use_hook(|| RefCell::new(Vec::new()));
render! {
@@ -1,7 +1,7 @@
error[E0521]: borrowed data escapes outside of function
--> compile_tests/props_safety.rs:8:5
|
5 | fn app(cx: Scope) -> Element {
5 | fn app() -> Element {
| --
| |
| `cx` is a reference that is only valid in the function body
@@ -2,7 +2,7 @@ use dioxus::prelude::*;
fn main() {}
fn app(cx: Scope) -> Element {
fn app() -> Element {
let count = vec![1, 2, 3];
render! {