fix ComponentProps partialeq
This commit is contained in:
1 parent
083ccd765c
commit
ed9573094c
1 file changed
+13
-3
@@ -27,9 +27,19 @@ pub fn in_runtime<R>(runtime: Rc<Runtime>, f: impl FnOnce() -> R) -> R {
|
|||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// // In a dynamic library
|
/// // In a dynamic library
|
||||||
/// #[inline_props]
|
/// #[derive(Props)]
|
||||||
/// fn Component(cx: Scope, runtime: std::rc::Rc<Runtime>) -> Element {
|
/// struct ComponentProps {
|
||||||
/// cx.use_hook(|| override_runtime(runtime.clone()));
|
/// 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 {} }
|
/// render! { div {} }
|
||||||
/// }
|
/// }
|
||||||
|
|||||||
Reference in new issue
Block a user