summaryrefslogtreecommitdiffstats
path: root/widget/src/lazy/component.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-05 15:08:08 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-05 15:08:31 +0200
commit9426418adbaac40f584fe16b623521a3a21a1a4c (patch)
tree10d578347aaa88e81bfe30da7b5c66623b3fe5d9 /widget/src/lazy/component.rs
parenteada3b8bf298c8436f30a5bc81032bed303d1e1e (diff)
downloadiced-9426418adbaac40f584fe16b623521a3a21a1a4c.tar.gz
iced-9426418adbaac40f584fe16b623521a3a21a1a4c.tar.bz2
iced-9426418adbaac40f584fe16b623521a3a21a1a4c.zip
Deprecate the `component` widget
Diffstat (limited to 'widget/src/lazy/component.rs')
-rw-r--r--widget/src/lazy/component.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs
index 1ec07e37..659bc476 100644
--- a/widget/src/lazy/component.rs
+++ b/widget/src/lazy/component.rs
@@ -1,4 +1,5 @@
//! Build and reuse custom widgets using The Elm Architecture.
+#![allow(deprecated)]
use crate::core::event;
use crate::core::layout::{self, Layout};
use crate::core::mouse;
@@ -31,6 +32,11 @@ use std::rc::Rc;
/// Additionally, a [`Component`] is capable of producing a `Message` to notify
/// the parent application of any relevant interactions.
#[cfg(feature = "lazy")]
+#[deprecated(
+ since = "0.13.0",
+ note = "components introduce encapsulated state and hamper the use of a single source of truth. \
+ Instead, leverage the Elm Architecture directly, or implement a custom widget"
+)]
pub trait Component<Message, Theme = crate::Theme, Renderer = crate::Renderer> {
/// The internal state of this [`Component`].
type State: Default;