wip: major cleanups to scheduler

This commit is contained in:
Jonathan Kelley committed 2021-11-06 23:11:17 -04:00
1 parent d96276a715
commit 2933e4bc11
36 files changed
+641 -663

No files matched your search

+3 -3
View File
@@ -11,7 +11,7 @@ fn test_borrowed_state() {
}
fn Parent((cx, _): Scope<()>) -> Element {
let value = cx.use_hook(|_| String::new(), |f| &*f, |_| {});
let value = cx.use_hook(|_| String::new(), |f| &*f);
cx.render(rsx! {
div {
@@ -28,7 +28,7 @@ struct ChildProps<'a> {
name: &'a str,
}
fn Child<'a>((cx, props): Scope<'a, ChildProps>) -> Element<'a> {
fn Child((cx, props): Scope<ChildProps>) -> Element {
cx.render(rsx! {
div {
h1 { "it's nested" }
@@ -42,7 +42,7 @@ struct Grandchild<'a> {
name: &'a str,
}
fn Child2<'a>((cx, props): Scope<'a, Grandchild>) -> Element<'a> {
fn Child2((cx, props): Scope<Grandchild>) -> Element {
cx.render(rsx! {
div { "Hello {props.name}!" }
})