rename HasProps to ComponentFunction

This commit is contained in:
Evan Almloff committed 2024-01-11 15:53:14 -06:00
1 parent 3267ddec10
commit 598b557aee
3 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
use crate::any_props::{BoxedAnyProps, VProps};
use crate::innerlude::{ElementRef, EventHandler, MountId, ScopeState};
use crate::properties::HasProps;
use crate::properties::ComponentFunction;
use crate::{arena::ElementId, Element, Event};
use crate::{Properties, VirtualDom};
use std::ops::Deref;
@@ -464,7 +464,7 @@ impl VComponent {
/// fn(Props) -> Element;
/// async fn(Scope<Props<'_>>) -> Element;
/// ```
pub fn new<F: HasProps<P> + 'static, P: 'static>(
pub fn new<F: ComponentFunction<P> + 'static, P: 'static>(
component: F,
props: F::Props,
fn_name: &'static str,