more consistent naming of the root component in core
This commit is contained in:
1 parent
7fe6e05da3
commit
3267ddec10
7 files changed
+31
-31
No files matched your search
@@ -139,7 +139,7 @@ impl ErrorBoundary {
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// #[component]
|
||||
/// fn App( count: String) -> Element {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
@@ -164,7 +164,7 @@ pub trait Throw<S = ()>: Sized {
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// #[component]
|
||||
/// fn App( count: String) -> Element {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
@@ -187,7 +187,7 @@ pub trait Throw<S = ()>: Sized {
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// #[component]
|
||||
/// fn App( count: String) -> Element {
|
||||
/// fn app( count: String) -> Element {
|
||||
/// let id: i32 = count.parse().throw()?;
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
|
||||
@@ -62,7 +62,7 @@ impl<const A: bool> FragmentBuilder<A> {
|
||||
/// ## Example
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// fn App() -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// cx.render(rsx!{
|
||||
/// CustomCard {
|
||||
/// h1 {}
|
||||
|
||||
@@ -158,7 +158,7 @@ impl ScopeContext {
|
||||
/// ```rust, ignore
|
||||
/// struct SharedState(&'static str);
|
||||
///
|
||||
/// static App: Component = |cx| {
|
||||
/// static app: Component = |cx| {
|
||||
/// cx.use_hook(|| cx.provide_context(SharedState("world")));
|
||||
/// render!(Child {})
|
||||
/// }
|
||||
|
||||
@@ -34,7 +34,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
/// title: String
|
||||
/// }
|
||||
///
|
||||
/// fn App(cx: AppProps) -> Element {
|
||||
/// fn app(cx: AppProps) -> Element {
|
||||
/// cx.render(rsx!(
|
||||
/// div {"hello, {cx.title}"}
|
||||
/// ))
|
||||
@@ -55,7 +55,7 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
/// static ROUTES: &str = "";
|
||||
///
|
||||
/// #[component]
|
||||
/// fn App(cx: AppProps) -> Element {
|
||||
/// fn app(cx: AppProps) -> Element {
|
||||
/// cx.render(rsx!(
|
||||
/// NavBar { routes: ROUTES }
|
||||
/// Title { "{cx.title}" }
|
||||
@@ -88,9 +88,9 @@ 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 { cx.render(rsx! { div {} }) }
|
||||
///
|
||||
/// let mut vdom = VirtualDom::new(App);
|
||||
/// let mut vdom = VirtualDom::new(app);
|
||||
/// let edits = vdom.rebuild();
|
||||
/// ```
|
||||
///
|
||||
@@ -127,13 +127,13 @@ use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, rc::Rc};
|
||||
/// Putting everything together, you can build an event loop around Dioxus by using the methods outlined above.
|
||||
/// ```rust, ignore
|
||||
/// #[component]
|
||||
/// fn App() -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// cx.render(rsx! {
|
||||
/// div { "Hello World" }
|
||||
/// })
|
||||
/// }
|
||||
///
|
||||
/// let dom = VirtualDom::new(App);
|
||||
/// let dom = VirtualDom::new(app);
|
||||
///
|
||||
/// real_dom.apply(dom.rebuild());
|
||||
///
|
||||
@@ -464,7 +464,7 @@ impl VirtualDom {
|
||||
/// # Example
|
||||
///
|
||||
/// ```rust, ignore
|
||||
/// let dom = VirtualDom::new(App);
|
||||
/// let dom = VirtualDom::new(app);
|
||||
/// let sender = dom.get_scheduler_channel();
|
||||
/// ```
|
||||
pub async fn wait_for_work(&mut self) {
|
||||
@@ -545,7 +545,7 @@ impl VirtualDom {
|
||||
///
|
||||
/// # Example
|
||||
/// ```rust, ignore
|
||||
/// static App: Component = |cx| cx.render(rsx!{ "hello world" });
|
||||
/// static app: Component = |cx| cx.render(rsx!{ "hello world" });
|
||||
///
|
||||
/// let mut dom = VirtualDom::new();
|
||||
/// let edits = dom.rebuild();
|
||||
|
||||
Reference in new issue
Block a user