Add flush_sync and pre_render methods to core

This commit is contained in:
Jonathan Kelley committed 2024-01-28 01:30:33 -08:00
1 parent 3ccf520205
commit 7b0dcb3206
17 files changed
+378 -282

No files matched your search

+3 -3
View File
@@ -65,7 +65,7 @@ struct BoxProps {
alpha: f32,
}
#[allow(non_snake_case)]
fn Box(cx: Scope<BoxProps>) -> Element {
fn Box(cx: ScopeState<BoxProps>) -> Element {
let count = use_signal(|| 0);
let x = cx.props.x * 2;
@@ -94,7 +94,7 @@ struct GridProps {
update_count: usize,
}
#[allow(non_snake_case)]
fn Grid(cx: Scope<GridProps>) -> Element {
fn Grid(cx: ScopeState<GridProps>) -> Element {
let size = cx.props.size;
let count = use_signal(|| 0);
let counts = use_signal(|| vec![0; size * size]);
@@ -151,7 +151,7 @@ fn Grid(cx: Scope<GridProps>) -> Element {
}
}
fn app(cx: Scope<GridProps>) -> Element {
fn app(cx: ScopeState<GridProps>) -> Element {
rsx! {
div{
width: "100%",