Rename to component function

This commit is contained in:
Jonathan Kelley committed 2024-01-16 15:09:44 -08:00
1 parent c94af9538b
commit 3fb7c359c2
6 files changed
+30 -21

No files matched your search

+6 -2
View File
@@ -5,7 +5,7 @@ use crate::{
use crate::{arena::ElementId, Element, Event};
use crate::{
innerlude::{ElementRef, EventHandler, MountId},
properties::ComponentFn,
properties::ComponentFunction,
};
use crate::{Properties, VirtualDom};
use core::panic;
@@ -533,7 +533,11 @@ impl VComponent {
/// fn(Props) -> Element;
/// async fn(Scope<Props<'_>>) -> Element;
/// ```
pub fn new<P, M>(component: impl ComponentFn<P, M>, props: P, fn_name: &'static str) -> Self
pub fn new<P, M>(
component: impl ComponentFunction<P, M>,
props: P,
fn_name: &'static str,
) -> Self
where
// The properties must be valid until the next bump frame
P: Properties + 'static,