remove cx.render
This commit is contained in:
159 files changed
+600
-658
No files matched your search
@@ -143,7 +143,7 @@ impl ErrorBoundary {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { "Count {}" }
|
||||
/// })
|
||||
/// }
|
||||
@@ -168,7 +168,7 @@ pub trait Throw<S = ()>: Sized {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { "Count {}" }
|
||||
/// })
|
||||
/// }
|
||||
@@ -191,7 +191,7 @@ pub trait Throw<S = ()>: Sized {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { "Count {}" }
|
||||
/// })
|
||||
/// }
|
||||
|
||||
@@ -146,7 +146,7 @@ impl<T: std::fmt::Debug> std::fmt::Debug for Event<T> {
|
||||
/// }
|
||||
///
|
||||
/// fn MyComponent(cx: MyProps) -> Element {
|
||||
/// cx.render(rsx!{
|
||||
/// rsx!{
|
||||
/// button {
|
||||
/// onclick: move |evt| cx.onclick.call(evt),
|
||||
/// }
|
||||
|
||||
@@ -63,7 +63,7 @@ impl<const A: bool> FragmentBuilder<A> {
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// fn app() -> Element {
|
||||
/// cx.render(rsx!{
|
||||
/// rsx!{
|
||||
/// CustomCard {
|
||||
/// h1 {}
|
||||
/// p {}
|
||||
@@ -77,7 +77,7 @@ impl<const A: bool> FragmentBuilder<A> {
|
||||
/// }
|
||||
///
|
||||
/// fn CustomCard(cx: CardProps) -> Element {
|
||||
/// cx.render(rsx!{
|
||||
/// rsx!{
|
||||
/// div {
|
||||
/// h1 {"Title card"}
|
||||
/// {cx.children}
|
||||
|
||||
@@ -35,7 +35,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
/// }
|
||||
///
|
||||
/// fn app(cx: AppProps) -> Element {
|
||||
/// cx.render(rsx!(
|
||||
/// rsx!(
|
||||
/// div {"hello, {cx.title}"}
|
||||
/// ))
|
||||
/// }
|
||||
@@ -56,7 +56,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
///
|
||||
/// #[component]
|
||||
/// fn app(cx: AppProps) -> Element {
|
||||
/// cx.render(rsx!(
|
||||
/// rsx!(
|
||||
/// NavBar { routes: ROUTES }
|
||||
/// Title { "{cx.title}" }
|
||||
/// Footer {}
|
||||
@@ -65,19 +65,19 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
///
|
||||
/// #[component]
|
||||
/// fn NavBar( routes: &'static str) -> Element {
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { "Routes: {routes}" }
|
||||
/// })
|
||||
/// }
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Footer() -> Element {
|
||||
/// cx.render(rsx! { div { "Footer" } })
|
||||
/// rsx! { div { "Footer" } })
|
||||
/// }
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Title<'a>( children: Element) -> Element {
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { id: "title", {children} }
|
||||
/// })
|
||||
/// }
|
||||
@@ -88,7 +88,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
///
|
||||
/// ```rust
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # fn app() -> Element { cx.render(rsx! { div {} }) }
|
||||
/// # fn app() -> Element { rsx! { div {} }) }
|
||||
///
|
||||
/// let mut vdom = VirtualDom::new(app);
|
||||
/// let edits = vdom.rebuild();
|
||||
@@ -128,7 +128,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
/// ```rust, ignore
|
||||
/// #[component]
|
||||
/// fn app() -> Element {
|
||||
/// cx.render(rsx! {
|
||||
/// rsx! {
|
||||
/// div { "Hello World" }
|
||||
/// })
|
||||
/// }
|
||||
@@ -219,7 +219,7 @@ impl VirtualDom {
|
||||
/// # Example
|
||||
/// ```rust, ignore
|
||||
/// fn Example() -> Element {
|
||||
/// cx.render(rsx!( div { "hello world" } ))
|
||||
/// rsx!( div { "hello world" } ))
|
||||
/// }
|
||||
///
|
||||
/// let dom = VirtualDom::new(Example);
|
||||
@@ -248,7 +248,7 @@ impl VirtualDom {
|
||||
/// }
|
||||
///
|
||||
/// fn Example(cx: SomeProps) -> Element {
|
||||
/// cx.render(rsx!{ div{ "hello {cx.name}" } })
|
||||
/// rsx!{ div{ "hello {cx.name}" } })
|
||||
/// }
|
||||
///
|
||||
/// let dom = VirtualDom::new(Example);
|
||||
@@ -546,7 +546,7 @@ impl VirtualDom {
|
||||
///
|
||||
/// # Example
|
||||
/// ```rust, ignore
|
||||
/// static app: Component = |cx| cx.render(rsx!{ "hello world" });
|
||||
/// static app: Component = |cx| rsx!{ "hello world" });
|
||||
///
|
||||
/// let mut dom = VirtualDom::new();
|
||||
/// let edits = dom.rebuild();
|
||||
|
||||
Reference in new issue
Block a user