polish: change in cx to cx

This commit is contained in:
Jonathan Kelley committed 2021-09-16 13:20:04 -04:00
1 parent 0ded32e184
commit 9971ff215d
21 files changed
+426 -320

No files matched your search

+3 -3
View File
@@ -106,7 +106,7 @@ pub static Example: FC<()> = |cx| {
// To fix this, call "render" method or use the "in" syntax to produce VNodes.
// There's nothing we can do about it, sorry :/ (unless you want *really* unhygenic macros)
{match true {
true => rsx!(in cx, h1 {"Top text"}),
true => rsx!(cx, h1 {"Top text"}),
false => cx.render(rsx!( h1 {"Bottom text"}))
}}
@@ -117,9 +117,9 @@ pub static Example: FC<()> = |cx| {
// True conditions need to be rendered (same reasons as matching)
{if true {
rsx!(in cx, h1 {"Top text"})
rsx!(cx, h1 {"Top text"})
} else {
rsx!(in cx, h1 {"Bottom text"})
rsx!(cx, h1 {"Bottom text"})
}}
// returning "None" is a bit noisy... but rare in practice