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
@@ -9,11 +9,11 @@ Using the router should feel similar to tide's routing framework where an "addre
Here's an example of how to use the router hook:
```rust
static App: FC<()> = |ctx| {
static App: FC<()> = |cx| {
// Route returns the associated VNodes
// This hook re-fires when the route changes
let route = use_router(ctx, |router| {
let route = use_router(cx, |router| {
router.at("/").get(|path| {
rsx!{ <LandingPage /> }
});
@@ -27,7 +27,7 @@ static App: FC<()> = |ctx| {
});
});
ctx.render(rsx!{
cx.render(rsx!{
div {
Navbar {}
{route}