chore: rename ctx to cx

This commit is contained in:
Jonathan Kelley committed 2021-06-25 21:15:33 -04:00
1 parent 23c14078bb
commit 81382e7044
99 files changed
+789 -664

No files matched your search

+3 -3
View File
@@ -14,8 +14,8 @@ struct ExampleProps {
initial_name: String,
}
static Example: FC<ExampleProps> = |ctx| {
let dispaly_name = use_state_new(&ctx, move || ctx.initial_name.clone());
static Example: FC<ExampleProps> = |cx| {
let dispaly_name = use_state_new(&cx, move || cx.initial_name.clone());
let buttons = ["Jack", "Jill", "Bob"].iter().map(|name| {
rsx!{
@@ -27,7 +27,7 @@ static Example: FC<ExampleProps> = |ctx| {
}
});
ctx.render(rsx! {
cx.render(rsx! {
div {
class: "py-12 px-4 text-center w-full max-w-2xl mx-auto",
// classes: [Some("asd")]
+2 -2
View File
@@ -53,11 +53,11 @@ fn html_render(
#[test]
fn test_serialize() {
let mut dom = VirtualDom::new(|ctx| {
let mut dom = VirtualDom::new(|cx| {
//
//
//
ctx.render(rsx! {
cx.render(rsx! {
div {
title: "About W3Schools"
{(0..20).map(|f| rsx!{