Document props and component macro (#2522)

* document prop attributes

* document children props

* fix children doc test
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-06-18 16:06:54 -07:00
1 parent f042e0029c
commit 3a4860add4
8 files changed
+861 -229

No files matched your search

+1 -1
View File
@@ -270,7 +270,7 @@ pub fn schedule_update_any() -> Arc<dyn Fn(ScopeId) + Send + Sync> {
/// Creates a callback that will be run before the component is removed.
/// This can be used to clean up side effects from the component
/// (created with [`use_effect`](crate::use_effect)).
/// (created with [`use_effect`](dioxus::prelude::use_effect)).
///
/// Example:
/// ```rust
+1 -1
View File
@@ -438,7 +438,7 @@ impl ScopeId {
/// Create a subscription that schedules a future render for the reference component. Unlike [`Self::needs_update`], this function will work outside of the dioxus runtime.
///
/// ## Notice: you should prefer using [`schedule_update_any`]
/// ## Notice: you should prefer using [`crate::prelude::schedule_update_any`]
pub fn schedule_update(&self) -> Arc<dyn Fn() + Send + Sync + 'static> {
Runtime::with_scope(*self, |cx| cx.schedule_update()).expect("to be in a dioxus runtime")
}