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
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user