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 -2
View File
@@ -1,12 +1,13 @@
## Liveview
With the Context, Subscription, and Asynchronous APIs, we've built Dioxus Liveview: a coupling of frontend and backend to deliver user experiences that do not require dedicated API development. Instead of building and maintaining frontend-specific API endpoints, components can directly access databases, server caches, and other services directly from the component.
These set of features are still experimental. Currently, we're still working on making these components more ergonomic
```rust
fn live_component(ctx: &Context<()>) -> VNode {
fn live_component(cx: &Context<()>) -> VNode {
use_live_component(
ctx,
cx,
// Rendered via the client
#[cfg(target_arch = "wasm32")]
|| html! { <div> {"Loading data from server..."} </div> },