fix ComponentProps partialeq

This commit is contained in:
Evan Almloff committed 2023-09-11 15:13:29 -05:00
1 parent 083ccd765c
commit ed9573094c
1 file changed
+13 -3
+13 -3
View File
@@ -27,9 +27,19 @@ pub fn in_runtime<R>(runtime: Rc<Runtime>, f: impl FnOnce() -> R) -> R {
/// }
///
/// // In a dynamic library
/// #[inline_props]
/// fn Component(cx: Scope, runtime: std::rc::Rc<Runtime>) -> Element {
/// cx.use_hook(|| override_runtime(runtime.clone()));
/// #[derive(Props)]
/// struct ComponentProps {
/// runtime: std::rc::Rc<Runtime>,
/// }
///
/// impl PartialEq for ComponentProps {
/// fn eq(&self, _other: &Self) -> bool {
/// true
/// }
/// }
///
/// fn Component(cx: Scope<ComponentProps>) -> Element {
/// cx.use_hook(|| override_runtime(cx.props.runtime.clone()));
///
/// render! { div {} }
/// }