docs: big updates to the reference
This commit is contained in:
1 parent
caf772cf24
commit
583fdfa561
57 files changed
+726
-247
No files matched your search
+4
-2
@@ -93,7 +93,7 @@
|
||||
//! Dioxus uses hooks for state management. Hooks are a form of state persisted between calls of the function component.
|
||||
//!
|
||||
//! ```
|
||||
//! static Example: FC<()> = |cx| {
|
||||
//! pub static Example: FC<()> = |cx| {
|
||||
//! let (val, set_val) = use_state(cx, || 0);
|
||||
//! cx.render(rsx!(
|
||||
//! button { onclick: move |_| set_val(val + 1) }
|
||||
@@ -156,7 +156,7 @@
|
||||
//! diouxs::web::launch(Example);
|
||||
//! }
|
||||
//!
|
||||
//! static Example: FC<()> = |cx| {
|
||||
//! pub static Example: FC<()> = |cx| {
|
||||
//! cx.render(rsx! {
|
||||
//! div { "Hello World!" }
|
||||
//! })
|
||||
@@ -188,6 +188,8 @@ pub use dioxus_hooks as hooks;
|
||||
#[cfg(feature = "desktop")]
|
||||
pub use dioxus_desktop as desktop;
|
||||
|
||||
pub mod debug {}
|
||||
|
||||
pub mod prelude {
|
||||
//! A glob import that includes helper types like FC, rsx!, html!, and required traits
|
||||
pub use dioxus_core::prelude::*;
|
||||
|
||||
Reference in new issue
Block a user