chore: rename ctx to cx
This commit is contained in:
1 parent
23c14078bb
commit
81382e7044
99 files changed
+789
-664
No files matched your search
@@ -179,9 +179,9 @@ mod tests {
|
||||
pretty_env_logger::init();
|
||||
log::info!("Hello!");
|
||||
|
||||
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(|ctx| {
|
||||
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(|cx| {
|
||||
todo!()
|
||||
// ctx.render(html! {
|
||||
// cx.render(html! {
|
||||
// <div>
|
||||
// "Hello world"
|
||||
// <button onclick={move |_| log::info!("button1 clicked!")}> "click me" </button>
|
||||
|
||||
@@ -147,10 +147,10 @@ fn main() {
|
||||
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
|
||||
}
|
||||
|
||||
fn Component(ctx: Context, props: ()) -> VNode {
|
||||
let user_data = use_sql_query(&ctx, USER_DATA_QUERY);
|
||||
fn Component(cx: Context, props: ()) -> VNode {
|
||||
let user_data = use_sql_query(&cx, USER_DATA_QUERY);
|
||||
|
||||
ctx.render(rsx! {
|
||||
cx.render(rsx! {
|
||||
h1 { "Hello, {username}"}
|
||||
button {
|
||||
"Delete user"
|
||||
|
||||
Reference in new issue
Block a user