Lazy Component generators have no need for capture semantics, so... we can make these simpler, behind the scenes.
This commit is contained in:
parent
732f88dec0
commit
4e822fa383
2 changed files with 6 additions and 2 deletions
|
|
@ -40,7 +40,11 @@ pub enum RSX {
|
|||
impl RSX {
|
||||
/// Shorthand method for creating a new `RSX::VirtualNode` instance. Rarely should you call
|
||||
/// this yourself; the `rsx! {}` macro handles this for you.
|
||||
pub fn node<F: Fn() -> Arc<RwLock<Component>> + Send + Sync + 'static>(tag: &'static str, create_fn: F, props: Props) -> RSX {
|
||||
pub fn node(
|
||||
tag: &'static str,
|
||||
create_fn: fn() -> Arc<RwLock<Component>>,
|
||||
props: Props
|
||||
) -> RSX {
|
||||
RSX::VirtualNode(VirtualNode {
|
||||
tag: tag,
|
||||
create_component_fn: Arc::new(create_fn),
|
||||
|
|
|
|||
Reference in a new issue