Remove dioxus-lib, fix doc imports (#4438)
* remove dioxus lib * inline some doc items * fix tests * test docs * Fix doc tests * Pull out dioxus/lib feature * disable logger and devtools in library feature * fix cargo doc * fix cargo doc
This commit is contained in:
1 parent
4cb32d372b
commit
98f7667fb4
59 files changed
+216
-530
No files matched your search
@@ -109,6 +109,7 @@ pub fn suspend(task: Task) -> Element {
|
||||
///
|
||||
/// ```rust, no_run
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_core::spawn_isomorphic;
|
||||
/// // ❌ Do not do requests in isomorphic tasks. It may resolve at a different time on the server and client, causing hydration issues.
|
||||
/// let mut state = use_signal(|| None);
|
||||
/// spawn_isomorphic(async move {
|
||||
@@ -171,6 +172,7 @@ pub fn queue_effect(f: impl FnOnce() + 'static) {
|
||||
///
|
||||
/// ```rust
|
||||
/// use dioxus::prelude::*;
|
||||
/// use dioxus_core::spawn_forever;
|
||||
///
|
||||
/// // The parent component can create and destroy children dynamically
|
||||
/// fn App() -> Element {
|
||||
@@ -373,6 +375,7 @@ pub fn schedule_update_any() -> Arc<dyn Fn(ScopeId) + Send + Sync> {
|
||||
/// Example:
|
||||
/// ```rust
|
||||
/// use dioxus::prelude::*;
|
||||
/// use dioxus_core::use_drop;
|
||||
///
|
||||
/// fn app() -> Element {
|
||||
/// let mut state = use_signal(|| true);
|
||||
|
||||
@@ -158,6 +158,7 @@ impl ReactiveContext {
|
||||
///
|
||||
/// ```rust, no_run
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_core::ReactiveContext;
|
||||
/// # use futures_util::StreamExt;
|
||||
/// fn use_simplified_memo(mut closure: impl FnMut() -> i32 + 'static) -> Signal<i32> {
|
||||
/// use_hook(|| {
|
||||
|
||||
@@ -448,6 +448,7 @@ impl Runtime {
|
||||
///
|
||||
/// ```rust
|
||||
/// use dioxus::prelude::*;
|
||||
/// use dioxus_core::{Runtime, RuntimeGuard};
|
||||
///
|
||||
/// fn main() {
|
||||
/// let virtual_dom = VirtualDom::new(app);
|
||||
|
||||
@@ -332,6 +332,7 @@ impl Scope {
|
||||
///
|
||||
/// ```rust, no_run
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_core::spawn_isomorphic;
|
||||
/// // ❌ Do not do requests in isomorphic tasks. It may resolve at a different time on the server and client, causing hydration issues.
|
||||
/// let mut state = use_signal(|| None);
|
||||
/// spawn_isomorphic(async move {
|
||||
|
||||
@@ -121,6 +121,7 @@ impl Runtime {
|
||||
///
|
||||
/// ```rust, no_run
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_core::spawn_isomorphic;
|
||||
/// // ❌ Do not do requests in isomorphic tasks. It may resolve at a different time on the server and client, causing hydration issues.
|
||||
/// let mut state = use_signal(|| None);
|
||||
/// spawn_isomorphic(async move {
|
||||
|
||||
Reference in new issue
Block a user